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.

71 lines
2.5 KiB

8 months ago
  1. using System.ComponentModel.DataAnnotations;
  2. using System.ComponentModel.DataAnnotations.Schema;
  3. using System.Text.Json.Serialization;
  4. namespace Mirle.Component.Database.Model.WES
  5. {
  6. /// <summary>
  7. /// 物料基本資料類別
  8. /// </summary>
  9. [Table("CFG_MATERIAL")]
  10. public class CfgMaterialDto : CommonDto
  11. {
  12. /// <summary>
  13. /// 物料編號
  14. /// </summary>
  15. /// <remarks>M[Product Type][Sequence * 2]</remarks>
  16. [Column(Name = "MATERIAL_ID")]
  17. [Required, Key, StringLength(30), JsonPropertyName("MATERIAL_ID"), JsonPropertyOrder(1)]
  18. public string MATERIAL_ID { get; set; }
  19. /// <summary>
  20. /// 物料名稱
  21. /// </summary>
  22. [Column(Name = "MATERIAL_NAME")]
  23. [Required, StringLength(50), JsonPropertyName("MATERIAL_NAME"), JsonPropertyOrder(2)]
  24. public string MATERIAL_NAME { get; set; }
  25. /// <summary>
  26. /// 物料單位
  27. /// </summary>
  28. [Column(Name = "MATERIAL_UNIT")]
  29. [Required, StringLength(3), JsonPropertyName("MATERIAL_UNIT"), JsonPropertyOrder(3)]
  30. public string MATERIAL_UNIT { get; set; } = "個";
  31. /// <summary>
  32. /// 物料類別
  33. /// </summary>
  34. /// <value>
  35. /// 0 = 原料 <br/>
  36. /// 1 = 零組件 <br/>
  37. /// 2 = 消耗性材料 <br/>
  38. /// 3 = 半成品 <br/>
  39. /// 4 = 完成品 <br/>
  40. /// </value>
  41. [Column(Name = "MATERIAL_TYPE")]
  42. [Required, JsonPropertyName("MATERIAL_TYPE"), JsonPropertyOrder(4)]
  43. public int MATERIAL_TYPE { get; set; }
  44. /// <summary>
  45. /// 物料重量
  46. /// </summary>
  47. /// <remarks>單位 : kgs</remarks>
  48. [Column(Name = "MATERIAL_WEIGHT")]
  49. [JsonPropertyName("MATERIAL_WEIGHT"), JsonPropertyOrder(5)]
  50. public double MATERIAL_WEIGHT { get; set; }
  51. /// <summary>
  52. /// 物料保存天數
  53. /// </summary>
  54. [Column(Name = "MATERIAL_SAFE_DAY")]
  55. [JsonPropertyName("MATERIAL_SAFE_DAY"), JsonPropertyOrder(6)]
  56. public int MATERIAL_SAFE_DAY { get; set; }
  57. /// <summary>
  58. /// 產品類別
  59. /// </summary>
  60. [Column(Name = "PRODUCT_TYPE")]
  61. [Required, StringLength(10), JsonPropertyName("PRODUCT_TYPE"), JsonPropertyOrder(7)]
  62. public string PRODUCT_TYPE { get; set; }
  63. /// <summary>
  64. /// 備註
  65. /// </summary>
  66. [Column(Name = "REMARKS")]
  67. [StringLength(255), JsonPropertyName("REMARKS"), JsonPropertyOrder(8)]
  68. public string REMARKS { get; set; }
  69. }
  70. }