|
|
using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Text.Json.Serialization;
namespace Mirle.Component.Database.Model.WES { /// <summary>
/// 即時任務主檔類別
/// </summary>
[Table("CUR_TASK_MST")] public class CurTaskMasterDto { /// <summary>
/// 命令序號
/// </summary>
/// <remarks>W[YYYYMMDDHH][Sequence * 5]</remarks>
[Column(Name = "CMD_SNO")] [Required, Key, StringLength(20), JsonPropertyName("CMD_SNO"), JsonPropertyOrder(1)] public string CMD_SNO { get; set; } /// <summary>
/// 任務編號
/// </summary>
/// <remarks>
/// Warehouse Controller System Task ID <br/>
/// P[YYYYMMDDHH][Sequence * 5] (PLCC) <br/>
/// A[YYYYMMDDHH][Sequence * 5] (AGVC) <br/>
/// S[YYYYMMDDHH][Sequence * 5] (SHTC) <br/>
/// </remarks>
[Column(Name = "TASK_ID")] [Required, Key, StringLength(16), JsonPropertyName("TASK_ID"), JsonPropertyOrder(2)] public string TASK_ID { get; set; } /// <summary>
/// 命令編號
/// </summary>
/// <remarks>
/// Controller System Command ID <br/>
/// [Sequence * 5] (AGVC) <br/>
/// [Sequence * 4] (PLCC) <br/>
/// [Sequence * 4] (SHTC) <br/>
/// </remarks>
[Column(Name = "CMD_ID"), Required, JsonPropertyName("CMD_ID"), JsonPropertyOrder(3)] public string CMD_ID { get; set; } /// <summary>
/// 任務完成狀態
/// </summary>
/// <value>
/// 0 = 初始化 <br/>
/// 1 = 待執行 <br/>
/// 2 = 已傳送 <br/>
/// 3 = 暫停 <br/>
/// 4 = 執行中 <br/>
/// 5 = 完成 <br/>
/// 6 = 強制完成 <br/>
/// 7 = 失敗 <br/>
/// 8 = 取消 <br/>
/// 9 = 強制取消 <br/>
/// 10 = 中止 <br/>
/// </value>
[Column(Name = "TASK_STATUS")] [Required, JsonPropertyName("TASK_STATUS"), JsonPropertyOrder(4)] public int TASK_STATUS { get; set; } = 0; /// <summary>
/// 任務模式
/// </summary>
/// <value>
/// 1 = 入庫 <br/>
/// 2 = 出庫 <br/>
/// 3 = 撿料/盤點 <br/>
/// 4 = 站對站 <br/>
/// 5 = 庫對庫 <br/>
/// 6 = 盤點作業 <br/>
/// 7 = 盤點調帳 <br/>
/// 8 = 儲位維護 <br/>
/// </value>
[Column(Name = "TASK_MODE")] [Required, JsonPropertyName("TASK_MODE"), JsonPropertyOrder(5)] public int TASK_MODE { get; set; } /// <summary>
/// 任務流水號
/// </summary>
/// <value>1 - 999</value>
/// <remarks>最大 999</remarks>
[Column(Name = "TASK_SEQ")] [Required, JsonPropertyName("TASK_SEQ"), JsonPropertyOrder(6)] public int TASK_SEQ { get; set; } = 1; /// <summary>
/// 命令優先權
/// </summary>
/// <value>0 - 9</value>
/// <remarks>0 最優先</remarks>
[Column(Name = "PRIORITY")] [Required, JsonPropertyName("PRIORITY"), JsonPropertyOrder(7)] public int PRIORITY { get; set; } = 9; /// <summary>
/// 起始位置
/// </summary>
[Column(Name = "SOURCE_POSITION")] [Required, StringLength(9), JsonPropertyName("SOURCE_POSITION"), JsonPropertyOrder(8)] public string SOURCE_POSITION { get; set; } /// <summary>
/// 目的位置
/// </summary>
[Column(Name = "DEST_POSITION")] [Required, StringLength(9), JsonPropertyName("DEST_POSITION"), JsonPropertyOrder(9)] public string DEST_POSITION { get; set; } /// <summary>
/// 載具編號
/// </summary>
[Column(Name = "CARRIER_ID")] [Required, StringLength(64), JsonPropertyName("CARRIER_ID"), JsonPropertyOrder(10)] public string CARRIER_ID { get; set; } /// <summary>
/// 軟體編號
/// </summary>
[Column(Name = "SOFTWARE_ID")] [Required, StringLength(7), JsonPropertyName("SOFTWARE_ID"), JsonPropertyOrder(11)] public string SOFTWARE_ID { get; set; } /// <summary>
/// 設備編號
/// </summary>
[Column(Name = "VEHICLE_ID")] [Required, StringLength(16), JsonPropertyName("VEHICLE_ID"), JsonPropertyOrder(12)] public string VEHICLE_ID { get; set; } /// <summary>
/// 建立時間
/// </summary>
[Column(Name = "CREATE_TIME")] [Required, JsonPropertyName("CREATE_TIME"), JsonPropertyOrder(13)] public DateTime CREATE_TIME { get; set; } = DateTime.Now; /// <summary>
/// 傳送時間
/// </summary>
[Column(Name = "SEND_TIME")] [JsonPropertyName("SEND_TIME"), JsonPropertyOrder(14)] public DateTime? SEND_TIME { get; set; } /// <summary>
/// 起始時間
/// </summary>
[Column(Name = "START_TIME")] [JsonPropertyName("START_TIME"), JsonPropertyOrder(15)] public DateTime? START_TIME { get; set; } /// <summary>
/// 結束時間
/// </summary>
[Column(Name = "END_TIME")] [JsonPropertyName("END_TIME"), JsonPropertyOrder(16)] public DateTime? END_TIME { get; set; } /// <summary>
/// 失敗原因
/// </summary>
[Column(Name = "FAILED_REASON")] [StringLength(255), JsonPropertyName("FAILED_REASON"), JsonPropertyOrder(17)] public string FAILED_REASON { get; set; } /// <summary>
/// 程式名稱
/// </summary>
[Column(Name = "PROGRAM_NAME")] [Required, StringLength(30), JsonPropertyName("PROGRAM_NAME"), JsonPropertyOrder(18)] public string PROGRAM_NAME { get; set; } } }
|