You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

162 lines
5.8 KiB

8 months ago
  1. using System;
  2. using System.ComponentModel.DataAnnotations;
  3. using System.ComponentModel.DataAnnotations.Schema;
  4. using System.Text.Json.Serialization;
  5. namespace Mirle.Component.Database.Model.WES
  6. {
  7. /// <summary>
  8. /// 即時任務主檔類別
  9. /// </summary>
  10. [Table("CUR_TASK_MST")]
  11. public class CurTaskMasterDto
  12. {
  13. /// <summary>
  14. /// 命令序號
  15. /// </summary>
  16. /// <remarks>W[YYYYMMDDHH][Sequence * 5]</remarks>
  17. [Column(Name = "CMD_SNO")]
  18. [Required, Key, StringLength(20), JsonPropertyName("CMD_SNO"), JsonPropertyOrder(1)]
  19. public string CMD_SNO { get; set; }
  20. /// <summary>
  21. /// 任務編號
  22. /// </summary>
  23. /// <remarks>
  24. /// Warehouse Controller System Task ID <br/>
  25. /// P[YYYYMMDDHH][Sequence * 5] (PLCC) <br/>
  26. /// A[YYYYMMDDHH][Sequence * 5] (AGVC) <br/>
  27. /// S[YYYYMMDDHH][Sequence * 5] (SHTC) <br/>
  28. /// </remarks>
  29. [Column(Name = "TASK_ID")]
  30. [Required, Key, StringLength(16), JsonPropertyName("TASK_ID"), JsonPropertyOrder(2)]
  31. public string TASK_ID { get; set; }
  32. /// <summary>
  33. /// 命令編號
  34. /// </summary>
  35. /// <remarks>
  36. /// Controller System Command ID <br/>
  37. /// [Sequence * 5] (AGVC) <br/>
  38. /// [Sequence * 4] (PLCC) <br/>
  39. /// [Sequence * 4] (SHTC) <br/>
  40. /// </remarks>
  41. [Column(Name = "CMD_ID"), Required, JsonPropertyName("CMD_ID"), JsonPropertyOrder(3)]
  42. public string CMD_ID { get; set; }
  43. /// <summary>
  44. /// 任務完成狀態
  45. /// </summary>
  46. /// <value>
  47. /// 0 = 初始化 <br/>
  48. /// 1 = 待執行 <br/>
  49. /// 2 = 已傳送 <br/>
  50. /// 3 = 暫停 <br/>
  51. /// 4 = 執行中 <br/>
  52. /// 5 = 完成 <br/>
  53. /// 6 = 強制完成 <br/>
  54. /// 7 = 失敗 <br/>
  55. /// 8 = 取消 <br/>
  56. /// 9 = 強制取消 <br/>
  57. /// 10 = 中止 <br/>
  58. /// </value>
  59. [Column(Name = "TASK_STATUS")]
  60. [Required, JsonPropertyName("TASK_STATUS"), JsonPropertyOrder(4)]
  61. public int TASK_STATUS { get; set; } = 0;
  62. /// <summary>
  63. /// 任務模式
  64. /// </summary>
  65. /// <value>
  66. /// 1 = 入庫 <br/>
  67. /// 2 = 出庫 <br/>
  68. /// 3 = 撿料/盤點 <br/>
  69. /// 4 = 站對站 <br/>
  70. /// 5 = 庫對庫 <br/>
  71. /// 6 = 盤點作業 <br/>
  72. /// 7 = 盤點調帳 <br/>
  73. /// 8 = 儲位維護 <br/>
  74. /// </value>
  75. [Column(Name = "TASK_MODE")]
  76. [Required, JsonPropertyName("TASK_MODE"), JsonPropertyOrder(5)]
  77. public int TASK_MODE { get; set; }
  78. /// <summary>
  79. /// 任務流水號
  80. /// </summary>
  81. /// <value>1 - 999</value>
  82. /// <remarks>最大 999</remarks>
  83. [Column(Name = "TASK_SEQ")]
  84. [Required, JsonPropertyName("TASK_SEQ"), JsonPropertyOrder(6)]
  85. public int TASK_SEQ { get; set; } = 1;
  86. /// <summary>
  87. /// 命令優先權
  88. /// </summary>
  89. /// <value>0 - 9</value>
  90. /// <remarks>0 最優先</remarks>
  91. [Column(Name = "PRIORITY")]
  92. [Required, JsonPropertyName("PRIORITY"), JsonPropertyOrder(7)]
  93. public int PRIORITY { get; set; } = 9;
  94. /// <summary>
  95. /// 起始位置
  96. /// </summary>
  97. [Column(Name = "SOURCE_POSITION")]
  98. [Required, StringLength(9), JsonPropertyName("SOURCE_POSITION"), JsonPropertyOrder(8)]
  99. public string SOURCE_POSITION { get; set; }
  100. /// <summary>
  101. /// 目的位置
  102. /// </summary>
  103. [Column(Name = "DEST_POSITION")]
  104. [Required, StringLength(9), JsonPropertyName("DEST_POSITION"), JsonPropertyOrder(9)]
  105. public string DEST_POSITION { get; set; }
  106. /// <summary>
  107. /// 載具編號
  108. /// </summary>
  109. [Column(Name = "CARRIER_ID")]
  110. [Required, StringLength(64), JsonPropertyName("CARRIER_ID"), JsonPropertyOrder(10)]
  111. public string CARRIER_ID { get; set; }
  112. /// <summary>
  113. /// 軟體編號
  114. /// </summary>
  115. [Column(Name = "SOFTWARE_ID")]
  116. [Required, StringLength(7), JsonPropertyName("SOFTWARE_ID"), JsonPropertyOrder(11)]
  117. public string SOFTWARE_ID { get; set; }
  118. /// <summary>
  119. /// 設備編號
  120. /// </summary>
  121. [Column(Name = "VEHICLE_ID")]
  122. [Required, StringLength(16), JsonPropertyName("VEHICLE_ID"), JsonPropertyOrder(12)]
  123. public string VEHICLE_ID { get; set; }
  124. /// <summary>
  125. /// 建立時間
  126. /// </summary>
  127. [Column(Name = "CREATE_TIME")]
  128. [Required, JsonPropertyName("CREATE_TIME"), JsonPropertyOrder(13)]
  129. public DateTime CREATE_TIME { get; set; } = DateTime.Now;
  130. /// <summary>
  131. /// 傳送時間
  132. /// </summary>
  133. [Column(Name = "SEND_TIME")]
  134. [JsonPropertyName("SEND_TIME"), JsonPropertyOrder(14)]
  135. public DateTime? SEND_TIME { get; set; }
  136. /// <summary>
  137. /// 起始時間
  138. /// </summary>
  139. [Column(Name = "START_TIME")]
  140. [JsonPropertyName("START_TIME"), JsonPropertyOrder(15)]
  141. public DateTime? START_TIME { get; set; }
  142. /// <summary>
  143. /// 結束時間
  144. /// </summary>
  145. [Column(Name = "END_TIME")]
  146. [JsonPropertyName("END_TIME"), JsonPropertyOrder(16)]
  147. public DateTime? END_TIME { get; set; }
  148. /// <summary>
  149. /// 失敗原因
  150. /// </summary>
  151. [Column(Name = "FAILED_REASON")]
  152. [StringLength(255), JsonPropertyName("FAILED_REASON"), JsonPropertyOrder(17)]
  153. public string FAILED_REASON { get; set; }
  154. /// <summary>
  155. /// 程式名稱
  156. /// </summary>
  157. [Column(Name = "PROGRAM_NAME")]
  158. [Required, StringLength(30), JsonPropertyName("PROGRAM_NAME"), JsonPropertyOrder(18)]
  159. public string PROGRAM_NAME { get; set; }
  160. }
  161. }