using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DbCommon.Enties.DbModels
{
    [SugarTable("CallTask")]
    public class CallTask
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public long Id { get; set; }
        public EnumCallType CallType { get; set; }
        public int Priority { get; set; }


        [SugarColumn(IsNullable = true, Length = 50)]
        public string WareHouseCode { get; set; }

        [SugarColumn(IsNullable = true, Length = 50)]
        public string LocationCode { get; set; }

        [SugarColumn(IsNullable = true, Length = 50)]
        public string TargetWareHouseCode { get; set; }

        [SugarColumn(IsNullable = true, Length = 50)]
        public string TargetLocationCode { get; set; }


        public EnumTaskType TaskType { get; set; }
        public EnumTaskStatus TaskStatus { get; set; }
        public DateTime TaskStatusUpdateTime { get; set; }
        public DateTime CallTime { get; set; }



        [SugarColumn(IsNullable = true, Length = 50)]
        public string PMSTaskID { get; set; }

        [SugarColumn(IsNullable = true, Length = 50)]
        public string PosArray { get; set; }

        [SugarColumn(IsNullable = true, Length = 50)]
        public string TaskBook { get; set; }
    }

    public enum EnumCallType
    {
        Pms = 0,
        Pad = 1,
    }

    public enum EnumTaskStatus
    {
        Called = 0,
        Created = 1,
        Started = 2,
        Finished = 3,

        TaskManualDeleted = 253,
        TaskAddException = 254,
        Exception = 255,
    }

    public enum EnumTaskType
    {
        None,
        原材料入库 = 1,
        原材料出库 = 2,
        工位运输出库 = 3,
        工位运输入库 = 4,

        手动上下料 = 100,
        调试流程 = 200
    }

    public enum EnumMaterialType
    {
        None = 0,
        FullTray = 1,
        EmptyTray = 2
    }
}
