using SqlSugar;
using WIDESEA_Core.DB.Models;
namespace WIDESEA_Model.Models;
/// 
/// 任务表
///
[SugarTable("Dt_Task", "任务表")]
public class Dt_Task : BaseEntity
{
    /// 
    /// 备  注:主键
    /// 默认值:
    ///
    [SugarColumn(ColumnName = "TaskId", IsPrimaryKey = true, IsIdentity = true)]
    public int TaskId { get; set; }
    /// 
    /// 备  注:任务号
    /// 默认值:
    ///
    [SugarColumn(ColumnName = "TaskNum")]
    public int? TaskNum { get; set; }
    /// 
    /// 备  注:托盘编号
    /// 默认值:
    ///
    [SugarColumn(ColumnName = "PalletCode", Length = 30)]
    public string? PalletCode { get; set; }
    /// 
    /// 备  注:单据编号
    /// 默认值:
    ///
    [SugarColumn(ColumnName = "OrderNo", Length = 30, IsNullable = true)]
    public string? OrderNo { get; set; }
    /// 
    /// 备  注:巷道
    /// 默认值:
    ///
    [SugarColumn(ColumnName = "Roadway", Length = 30, IsNullable = true)]
    public string? Roadway { get; set; }
    /// 
    /// 备  注:任务类型(100 出库;盘点出库 101; 102 分拣出库;103 质检出库;200 入库;盘点入库 201;分拣入库 202;质检入库 203;移库 300;库内移库 301;库外移库 302  )
    /// 默认值:
    ///
    [SugarColumn(ColumnName = "TaskType")]
    public int TaskType { get; set; }
    /// 
    /// 备  注:任务状态(0新建入库任务,   100GV入库执行中,  101 AGV入库完成,  102输送线入库执行中, 103输送线入库完成,  104堆垛机入库执行中, 105堆垛机入库完成,   106入库任务完成,107入库任务取消 )
    /// 默认值:
    ///
    [SugarColumn(ColumnName = "TaskState")]
    public int? TaskState { get; set; }
    /// 
    /// 备  注:物料编号
    /// 默认值:
    ///
    [SugarColumn(ColumnName = "MaterialNo", Length = 30, IsNullable = true)]
    public string? MaterialNo { get; set; }
    /// 
    /// 备  注:起始地址
    /// 默认值:
    ///
    [SugarColumn(ColumnName = "SourceAddress", Length = 30)]
    public string? SourceAddress { get; set; }
    /// 
    /// 备  注:目标地址
    /// 默认值:
    ///
    [SugarColumn(ColumnName = "TargetAddress", Length = 30)]
    public string? TargetAddress { get; set; }
    /// 
    /// 备  注:当前位置
    /// 默认值:
    ///
    [SugarColumn(ColumnName = "CurrentAddress", Length = 30)]
    public string? CurrentAddress { get; set; }
    /// 
    /// 备  注:下一地址
    /// 默认值:
    ///
    [SugarColumn(ColumnName = "NextAddress", Length = 30)]
    public string? NextAddress { get; set; }
    /// 
    /// 备  注:优先级
    /// 默认值:
    ///
    [SugarColumn(ColumnName = "Grade")]
    public int? Grade { get; set; }
    /// 
    /// 备  注:任务下发时间
    /// 默认值:
    ///
    [SugarColumn(ColumnName = "Dispatchertime")]
    public DateTime? Dispatchertime { get; set; }
    /// 
    /// 备  注:备注
    /// 默认值:
    ///
    [SugarColumn(ColumnName = "Remark", Length = 100, IsNullable = true)]
    public string? Remark { get; set; }
    /// 
    /// 备  注:
    /// 默认值:
    ///
    [SugarColumn(ColumnName = "ErrorMessage", Length = 100, IsNullable = true)]
    public string? ErrorMessage { get; set; }
    /// 
    /// 备  注: 托盘产线
    /// 默认值:
    ///
    [SugarColumn(ColumnName = "ProductionLine", Length = 20, IsNullable = true)]
    public string? ProductionLine { get; set; }
    /// 
    /// 备  注: 当前工序
    /// 默认值:
    ///
    [SugarColumn(ColumnName = "ProcessCode", Length = 255, IsNullable = true)]
    public string? ProcessCode { get; set; }
    
    /// 
    /// 任务执行明细
    /// 
    [SugarColumn(ColumnName = "任务执行明细")]
    [Navigate(NavigateType.OneToMany, nameof(Dt_TaskExecuteDetail.TaskId))]
    public List Dt_TaskExecuteDetailList { get; set; }
}