using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;
namespace Mirle.Component.Database.Model.WES
{
///
/// 即時物料資訊類別
///
[Table("CUR_MATERIAL_DATA")]
public class CurMaterialDataDto
{
///
/// 儲存區編號
///
/// STG[Floor][Sequence * 2]
[Column(Name = "STORAGE_ID")]
[Required, Key, StringLength(6), JsonPropertyName("STORAGE_ID"), JsonPropertyOrder(1)]
public string STORAGE_ID { get; set; }
///
/// 儲位編號
///
[Column(Name = "LOC_ID")]
[Required, Key, StringLength(9), JsonPropertyName("LOC_ID"), JsonPropertyOrder(2)]
public string LOC_ID { get; set; }
///
/// 命令序號
///
///
/// Warehouse Executeing System Command Sequence Number
/// W[YYYYMMDDHH][Sequence * 5]
///
[Column(Name = "CMD_SNO")]
[Required, StringLength(20), JsonPropertyName("CMD_SNO"), JsonPropertyOrder(3)]
public string CMD_SNO { get; set; }
///
/// 載具編號
///
/// 棧板編號/物流箱號
[Column(Name = "CARRIER_ID")]
[Required, StringLength(64), JsonPropertyName("CARRIER_ID"), JsonPropertyOrder(4)]
public string CARRIER_ID { get; set; }
///
/// 物料編號
///
/// M[Product Type][Sequnece * 2]
[Column(Name = "MATERILA_ID")]
[Required, StringLength(30), JsonPropertyName("MATERILA_ID"), JsonPropertyOrder(5)]
public string MATERILA_ID { get; set; }
///
/// 物料批號
///
[Column(Name = "MATERILA_BATCH")]
[JsonPropertyName("MATERILA_BATCH"), JsonPropertyOrder(6)]
public int MATERILA_BATCH { get; set; }
///
/// 物料數量
///
[Column(Name = "MATERIAL_QUANTITY")]
[Required, JsonPropertyName("MATERIAL_QUANTITY"), JsonPropertyOrder(7)]
public int MATERIAL_QUANTITY { get; set; } = 1;
///
/// 物料重量 (KG)
///
[Column(Name = "MATERIAL_WEIGHT")]
[JsonPropertyName("MATERIAL_WEIGHT"), JsonPropertyOrder(8)]
public double MATERIAL_WEIGHT { get; set; }
///
/// 程式名稱
///
[Column(Name = "PROGRAM_NAME")]
[Required, StringLength(30), JsonPropertyName("PROGRAM_NAME"), JsonPropertyOrder(9)]
public string PROGRAM_NAME { get; set; }
///
/// 更新時間
///
[Column(Name = "UPDATE_TIME")]
[Required, JsonPropertyName("UPDATE_TIME"), JsonPropertyOrder(10)]
public DateTime UPDATE_TIME { get; set; } = DateTime.Now;
}
}