using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Text.Json.Serialization; namespace Mirle.Component.Database.Model.WES { /// /// 物料基本資料類別 /// [Table("CFG_MATERIAL")] public class CfgMaterialDto : CommonDto { /// /// 物料編號 /// /// M[Product Type][Sequence * 2] [Column(Name = "MATERIAL_ID")] [Required, Key, StringLength(30), JsonPropertyName("MATERIAL_ID"), JsonPropertyOrder(1)] public string MATERIAL_ID { get; set; } /// /// 物料名稱 /// [Column(Name = "MATERIAL_NAME")] [Required, StringLength(50), JsonPropertyName("MATERIAL_NAME"), JsonPropertyOrder(2)] public string MATERIAL_NAME { get; set; } /// /// 物料單位 /// [Column(Name = "MATERIAL_UNIT")] [Required, StringLength(3), JsonPropertyName("MATERIAL_UNIT"), JsonPropertyOrder(3)] public string MATERIAL_UNIT { get; set; } = "個"; /// /// 物料類別 /// /// /// 0 = 原料
/// 1 = 零組件
/// 2 = 消耗性材料
/// 3 = 半成品
/// 4 = 完成品
///
[Column(Name = "MATERIAL_TYPE")] [Required, JsonPropertyName("MATERIAL_TYPE"), JsonPropertyOrder(4)] public int MATERIAL_TYPE { get; set; } /// /// 物料重量 /// /// 單位 : kgs [Column(Name = "MATERIAL_WEIGHT")] [JsonPropertyName("MATERIAL_WEIGHT"), JsonPropertyOrder(5)] public double MATERIAL_WEIGHT { get; set; } /// /// 物料保存天數 /// [Column(Name = "MATERIAL_SAFE_DAY")] [JsonPropertyName("MATERIAL_SAFE_DAY"), JsonPropertyOrder(6)] public int MATERIAL_SAFE_DAY { get; set; } /// /// 產品類別 /// [Column(Name = "PRODUCT_TYPE")] [Required, StringLength(10), JsonPropertyName("PRODUCT_TYPE"), JsonPropertyOrder(7)] public string PRODUCT_TYPE { get; set; } /// /// 備註 /// [Column(Name = "REMARKS")] [StringLength(255), JsonPropertyName("REMARKS"), JsonPropertyOrder(8)] public string REMARKS { get; set; } } }