good_models.go 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. package models
  2. type GoodsType struct {
  3. ID int64 `gorm:"column:id" json:"id"`
  4. TypeCode string `gorm:"column:type_code" json:"type_code"`
  5. TypeName string `gorm:"column:type_name" json:"type_name"`
  6. Remark string `gorm:"column:remark" json:"remark"`
  7. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  8. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  9. Creater int64 `gorm:"column:creater" json:"creater"`
  10. Modifier int64 `gorm:"column:modifier" json:"modifier"`
  11. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  12. Status int64 `gorm:"column:status" json:"status"`
  13. Type int64 `gorm:"column:type" json:"type"`
  14. Number int64 `gorm:"column:number" json:"number"`
  15. OutStock int64 `gorm:"column:out_stock" json:"out_stock" form:"out_stock"`
  16. StockAttribute int64 `gorm:"column:stock_attribute" json:"stock_attribute" form:"stock_attribute"`
  17. }
  18. func (GoodsType) TableName() string {
  19. return "xt_goods_type"
  20. }
  21. type GoodInfo struct {
  22. ID int64 `gorm:"column:id" json:"id" form:"id"`
  23. GoodCode string `gorm:"column:good_code" json:"good_code" form:"good_code"`
  24. SpecificationName string `gorm:"column:specification_name" json:"specification_name" form:"specification_name"`
  25. GoodTypeId int64 `gorm:"column:good_type_id" json:"good_type_id" form:"good_type_id"`
  26. GoodUnit int64 `gorm:"column:good_unit" json:"good_unit" form:"good_unit"`
  27. BuyPrice float64 `gorm:"column:buy_price" json:"buy_price" form:"buy_price"`
  28. SellPrice float64 `gorm:"column:sell_price" json:"sell_price" form:"sell_price"`
  29. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  30. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  31. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  32. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  33. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  34. ExpiryDateWarnDayCount int64 `gorm:"column:expiry_date_warn_day_count" json:"expiry_date_warn_day_count" form:"expiry_date_warn_day_count"`
  35. StockWarnCount int64 `gorm:"column:stock_warn_count" json:"stock_warn_count" form:"stock_warn_count"`
  36. IsReuse int64 `gorm:"column:is_reuse" json:"is_reuse" form:"is_reuse"`
  37. Status int64 `gorm:"column:status" json:"status" form:"status"`
  38. FilmArea string `gorm:"column:film_area" json:"film_area" form:"film_area"`
  39. IsUse int64 `gorm:"column:is_use" json:"is_use" form:"is_use"`
  40. FilmMaterialQuality string `gorm:"column:film_material_quality" json:"film_material_quality" form:"film_material_quality"`
  41. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  42. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  43. Creater int64 `gorm:"column:creater" json:"creater" form:"creater"`
  44. GoodName string `gorm:"column:good_name" json:"good_name" form:"good_name"`
  45. Pinyin string `gorm:"column:pinyin" json:"pinyin" form:"pinyin"`
  46. Wubi string `gorm:"column:wubi" json:"wubi" form:"wubi"`
  47. GoodKind int64 `gorm:"column:good_kind" json:"good_kind" form:"good_kind"`
  48. MedicalInsuranceLevel int64 `gorm:"column:medical_insurance_level" json:"medical_insurance_level" form:"medical_insurance_level"`
  49. RetailPrice float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
  50. MedicalInsuranceNumber string `gorm:"column:medical_insurance_number" json:"medical_insurance_number" form:"medical_insurance_number"`
  51. IsSpecialDiseases int64 `gorm:"column:is_special_diseases" json:"is_special_diseases" form:"is_special_diseases"`
  52. IsRecord int64 `gorm:"column:is_record" json:"is_record" form:"is_record"`
  53. StatisticsCategory int64 `gorm:"column:statistics_category" json:"statistics_category" form:"statistics_category"`
  54. GoodStatus string `gorm:"column:good_status" json:"good_status" form:"good_status"`
  55. DefaultCount int64 `gorm:"column:default_count" json:"default_count" form:"default_count"`
  56. Sign int64 `gorm:"column:sign" json:"sign" form:"sign"`
  57. IsDefault int64 `gorm:"column:is_default" json:"is_default" form:"is_default"`
  58. IsChargeUse int64 `gorm:"column:is_charge_use" json:"is_charge_use" form:"is_charge_use"`
  59. IsChargePredict int64 `gorm:"column:is_charge_predict" json:"is_charge_predict" form:"is_charge_predict"`
  60. IsStatisticsWork int64 `gorm:"column:is_statistics_work" json:"is_statistics_work" form:"is_statistics_work"`
  61. Sort int64 `gorm:"column:sort" json:"sort" form:"sort"`
  62. IsDoctorUse int64 `gorm:"column:is_doctor_use" json:"is_doctor_use" form:"is_doctor_use"`
  63. Agent string `gorm:"column:agent" json:"agent" form:"agent"`
  64. GoodNumber string `gorm:"column:good_number" json:"good_number" form:"good_number"`
  65. GoodsType GoodsType `gorm:"ForeignKey:ID;AssociationForeignKey:GoodTypeId" json:"type"`
  66. CommdityCode string `gorm:"column:commdity_code" json:"commdity_code" form:"commdity_code"`
  67. SocialSecurityDirectoryCode string `gorm:"column:social_security_directory_code" json:"social_security_directory_code" form:"social_security_directory_code"`
  68. ProductionType string `gorm:"column:production_type" json:"production_type" form:"production_type"`
  69. SpecialMedical string `gorm:"column:special_medical" json:"special_medical" form:"special_medical"`
  70. IsMark int64 `gorm:"column:is_mark" json:"is_mark" form:"is_mark"`
  71. MinNumber int64 `gorm:"column:min_number" json:"min_number" form:"min_number"`
  72. PackingUnit string `gorm:"column:packing_unit" json:"packing_unit" form:"packing_unit"`
  73. PackingPrice float64 `gorm:"column:packing_price" json:"packing_price" form:"packing_price"`
  74. DefaultCountUnit string `gorm:"column:default_count_unit" json:"default_count_unit" form:"default_count_unit"`
  75. MinUnit string `gorm:"column:min_unit" json:"min_unit" form:"min_unit"`
  76. Total float64 `gorm:"column:total" json:"total" form:"total"`
  77. StWarehousingInfo []*StWarehousingInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"xt_warehouse_info"`
  78. CancelStockInfo []*CancelStockInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"cancel_stock_info"`
  79. }
  80. func (GoodInfo) TableName() string {
  81. return "xt_good_information"
  82. }
  83. type GoodsTypeOne struct {
  84. ID int64 `gorm:"column:id" json:"id"`
  85. TypeCode string `gorm:"column:type_code" json:"type_code"`
  86. TypeName string `gorm:"column:type_name" json:"type_name"`
  87. Remark string `gorm:"column:remark" json:"remark"`
  88. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  89. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  90. Creater int64 `gorm:"column:creater" json:"creater"`
  91. Modifier int64 `gorm:"column:modifier" json:"modifier"`
  92. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  93. Status int64 `gorm:"column:status" json:"status"`
  94. Type int64 `gorm:"column:type" json:"type"`
  95. Number int64 `gorm:"column:number" json:"number"`
  96. OutStock int64 `gorm:"column:out_stock" json:"out_stock" form:"out_stock"`
  97. StockAttribute int64 `gorm:"column:stock_attribute" json:"stock_attribute" form:"stock_attribute"`
  98. GoodInfo []*GoodInfo `gorm:"ForeignKey:GoodTypeId;AssociationForeignKey:ID" json:"GoodInfo"`
  99. }
  100. func (GoodsTypeOne) TableName() string {
  101. return "xt_goods_type"
  102. }
  103. type XtCancelStockInfo struct {
  104. ID int64 `gorm:"column:id" json:"id"`
  105. GoodId int64 `gorm:"column:good_id" json:"good_id"`
  106. CancelStockId int64 `gorm:"column:cancel_stock_id" json:"cancel_stock_id"`
  107. GoodTypeId int64 `gorm:"column:good_type_id" json:"good_type_id"`
  108. Count int64 `gorm:"column:count" json:"count"`
  109. Price float64 `gorm:"column:price" json:"price"`
  110. Total float64 `gorm:"column:total" json:"total"`
  111. ProductDate int64 `gorm:"column:product_date" json:"product_date"`
  112. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date"`
  113. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  114. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  115. Status int64 `gorm:"column:status" json:"status"`
  116. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  117. OrderNumber string `gorm:"column:order_number" json:"order_number"`
  118. Type int64 `gorm:"column:type" json:"type"`
  119. Dealer string `gorm:"column:dealer" json:"dealer"`
  120. Manufacturer string `gorm:"column:manufacturer" json:"manufacturer"`
  121. GoodInfo GoodInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"GoodInfo"`
  122. Number string `gorm:"column:number" json:"number" form:"number"`
  123. RegisterAccount string `gorm:"column:register_account" json:"register_account" form:"register_account"`
  124. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  125. }
  126. func (XtCancelStockInfo) TableName() string {
  127. return "xt_cancel_stock_info"
  128. }