using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;
namespace Mirle.Component.Database.Model.WES
{
///
/// 即時命令主檔類別
///
[Table("CUR_CMD_MST")]
public class CurCommandMasterDto
{
///
/// 命令序號
///
///
/// Warehouse Executeing System Command Sequence Number
/// W[YYYYMMDDHH][Sequence * 5]
///
[Column(Name = "CMD_SNO")]
[Required, Key, StringLength(20), JsonPropertyName("CMD_SNO"), JsonPropertyOrder(1)]
public string CMD_SNO { get; set; }
///
/// 命令狀態
///
///
/// 0 = 初始化
/// 1 = WES 待執行
/// 2 = WCS 待執行
/// 3 = 執行中
/// 4 = 完成
/// 5 = 電腦強制完成
/// 6 = 地上盤強制完成
/// 7 = 失敗
/// 8 = 取消
/// 9 = 電腦強制取消
/// 10 = 地上盤強制取消
/// 11 = 空出庫
/// 12 = 二重格
///
[Column(Name = "CMD_STATUS")]
[Required, JsonPropertyName("CMD_STATUS"), JsonPropertyOrder(2)]
public int CMD_STATUS { get; set; } = 0;
///
/// 命令模式
///
///
/// 1 = 入庫
/// 2 = 出庫
/// 3 = 撿料/盤點
/// 4 = 站對站
/// 5 = 庫對庫
/// 6 = 盤點作業
/// 7 = 盤點調帳
/// 8 = 儲位維護
///
[Column(Name = "CMD_MODE")]
[Required, JsonPropertyName("CMD_MODE"), JsonPropertyOrder(3)]
public string CMD_MODE { get; set; }
///
/// 命令優先權
///
/// 0 - 9
/// 0 最優先
[Column(Name = "PRIORITY")]
[Required, JsonPropertyName("PRIORITY"), JsonPropertyOrder(4)]
public int PRIORITY { get; set; } = 9;
///
/// 起始儲存區編號
///
[Column(Name = "SOURCE_STORAGE_ID")]
[Required, StringLength(6), JsonPropertyName("SOURCE_STORAGE_ID"), JsonPropertyOrder(5)]
public string SOURCE_STORAGE_ID { get; set; }
///
/// 起始位置
///
[Column(Name = "SOURCE_POSITION")]
[Required, StringLength(9), JsonPropertyName("SOURCE_POSITION"), JsonPropertyOrder(6)]
public string SOURCE_POSITION { get; set; }
///
/// 目的儲存區編號
///
[Column(Name = "DEST_STORAGE_ID")]
[Required, StringLength(6), JsonPropertyName("DEST_STORAGE_ID"), JsonPropertyOrder(7)]
public string DEST_STORAGE_ID { get; set; }
///
/// 目的位置
///
[Column(Name = "DEST_POSITION")]
[Required, StringLength(9), JsonPropertyName("dest_postion"), JsonPropertyOrder(8)]
public string DestinationPosition { get; set; }
///
/// 載具編號
///
/// 棧板編號/物流箱號
[Column(Name = "CARRIER_ID")]
[Required, StringLength(64), JsonPropertyName("CARRIER_ID"), JsonPropertyOrder(9)]
public string CARRIER_ID { get; set; }
///
/// 建立時間
///
[Column(Name = "CREATE_TIME")]
[Required, JsonPropertyName("CREATE_TIME"), JsonPropertyOrder(10)]
public DateTime CREATE_TIME { get; set; } = DateTime.Now;
///
/// 傳送時間
///
[Column(Name = "SEND_TIME")]
[JsonPropertyName("SEND_TIME"), JsonPropertyOrder(11)]
public DateTime? SEND_TIME { get; set; }
///
/// 起始時間
///
[Column(Name = "START_TIME")]
[JsonPropertyName("START_TIME"), JsonPropertyOrder(12)]
public DateTime? START_TIME { get; set; }
///
/// 結束時間
///
[Column(Name = "END_TIME")]
[JsonPropertyName("END_TIME"), JsonPropertyOrder(13)]
public DateTime? END_TIME { get; set; }
///
/// 失敗原因
///
[Column(Name = "FAILED_REASON")]
[JsonPropertyName("FAILED_REASON"), JsonPropertyOrder(14)]
public string FAILED_REASON { get; set; }
///
/// 程式名稱
///
/// 寫入的程式名稱
[Column(Name = "PROGRAM_NAME")]
[Required, StringLength(30), JsonPropertyName("PROGRAM_NAME"), JsonPropertyOrder(15)]
public string PROGRAM_NAME { get; set; }
///
/// 建立人員
///
[Column(Name = "CREATE_USER")]
[Required, StringLength(30), JsonPropertyName("CREATE_USER"), JsonPropertyOrder(16)]
public string CREATE_USER { get; set; }
///
/// 更新人員
///
[Column(Name = "UPDATE_USER")]
[Required, StringLength(30), JsonPropertyName("UPDATE_USER"), JsonPropertyOrder(17)]
public string UPDATE_USER { get; set; }
}
}