good_models.go 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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. ProvincesCode string `gorm:"column:provinces_code" json:"provinces_code" form:"provinces_code"`
  52. IsSpecialDiseases int64 `gorm:"column:is_special_diseases" json:"is_special_diseases" form:"is_special_diseases"`
  53. IsRecord int64 `gorm:"column:is_record" json:"is_record" form:"is_record"`
  54. StatisticsCategory int64 `gorm:"column:statistics_category" json:"statistics_category" form:"statistics_category"`
  55. GoodStatus string `gorm:"column:good_status" json:"good_status" form:"good_status"`
  56. DefaultCount int64 `gorm:"column:default_count" json:"default_count" form:"default_count"`
  57. Sign int64 `gorm:"column:sign" json:"sign" form:"sign"`
  58. IsDefault int64 `gorm:"column:is_default" json:"is_default" form:"is_default"`
  59. IsChargeUse int64 `gorm:"column:is_charge_use" json:"is_charge_use" form:"is_charge_use"`
  60. IsChargePredict int64 `gorm:"column:is_charge_predict" json:"is_charge_predict" form:"is_charge_predict"`
  61. IsStatisticsWork int64 `gorm:"column:is_statistics_work" json:"is_statistics_work" form:"is_statistics_work"`
  62. Sort int64 `gorm:"column:sort" json:"sort" form:"sort"`
  63. IsDoctorUse int64 `gorm:"column:is_doctor_use" json:"is_doctor_use" form:"is_doctor_use"`
  64. Agent string `gorm:"column:agent" json:"agent" form:"agent"`
  65. GoodNumber string `gorm:"column:good_number" json:"good_number" form:"good_number"`
  66. GoodsType GoodsType `gorm:"ForeignKey:ID;AssociationForeignKey:GoodTypeId" json:"type"`
  67. CommdityCode string `gorm:"column:commdity_code" json:"commdity_code" form:"commdity_code"`
  68. SocialSecurityDirectoryCode string `gorm:"column:social_security_directory_code" json:"social_security_directory_code" form:"social_security_directory_code"`
  69. ProductionType string `gorm:"column:production_type" json:"production_type" form:"production_type"`
  70. SpecialMedical string `gorm:"column:special_medical" json:"special_medical" form:"special_medical"`
  71. IsMark int64 `gorm:"column:is_mark" json:"is_mark" form:"is_mark"`
  72. MinNumber int64 `gorm:"column:min_number" json:"min_number" form:"min_number"`
  73. PackingUnit string `gorm:"column:packing_unit" json:"packing_unit" form:"packing_unit"`
  74. PackingPrice float64 `gorm:"column:packing_price" json:"packing_price" form:"packing_price"`
  75. DefaultCountUnit string `gorm:"column:default_count_unit" json:"default_count_unit" form:"default_count_unit"`
  76. MinUnit string `gorm:"column:min_unit" json:"min_unit" form:"min_unit"`
  77. Total float64 `gorm:"column:total" json:"total" form:"total"`
  78. StWarehousingInfo []*StWarehousingInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"xt_warehouse_info"`
  79. CancelStockInfo []*CancelStockInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"cancel_stock_info"`
  80. RegisterNumber string `gorm:"column:register_number" json:"register_number" form:"register_number"`
  81. GoodSotckInfo []*GoodSotckInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"good_stock_in"`
  82. IsUser int64 `gorm:"column:is_user" json:"is_user" form:"is_user"`
  83. Number string `gorm:"column:number" json:"number" form:"number"`
  84. IsWarehouse int64 `gorm:"column:is_warehouse" json:"is_warehouse" form:"is_warehouse"`
  85. SumCount int64 `gorm:"column:sum_count" json:"sum_count" form:"sum_count"`
  86. BatchRetaiPrice float64 `gorm:"column:batch_retai_price" json:"batch_retai_price" form:"batch_retai_price"`
  87. SumInCount int64 `gorm:"column:sum_in_count" json:"sum_in_count" form:"sum_in_count"`
  88. WarehousingInfo []*WarehousingInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"warehouse_info"`
  89. }
  90. func (GoodInfo) TableName() string {
  91. return "xt_good_information"
  92. }
  93. type GoodInfoSeven struct {
  94. ID int64 `gorm:"column:id" json:"id" form:"id"`
  95. GoodName string `gorm:"column:good_name" json:"good_name" form:"good_name"`
  96. }
  97. func (GoodInfoSeven) TableName() string {
  98. return "xt_good_information"
  99. }
  100. type GoodsTypeOne struct {
  101. ID int64 `gorm:"column:id" json:"id"`
  102. TypeCode string `gorm:"column:type_code" json:"type_code"`
  103. TypeName string `gorm:"column:type_name" json:"type_name"`
  104. Remark string `gorm:"column:remark" json:"remark"`
  105. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  106. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  107. Creater int64 `gorm:"column:creater" json:"creater"`
  108. Modifier int64 `gorm:"column:modifier" json:"modifier"`
  109. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  110. Status int64 `gorm:"column:status" json:"status"`
  111. Type int64 `gorm:"column:type" json:"type"`
  112. Number int64 `gorm:"column:number" json:"number"`
  113. OutStock int64 `gorm:"column:out_stock" json:"out_stock" form:"out_stock"`
  114. StockAttribute int64 `gorm:"column:stock_attribute" json:"stock_attribute" form:"stock_attribute"`
  115. GoodInfo []*GoodInfo `gorm:"ForeignKey:GoodTypeId;AssociationForeignKey:ID" json:"GoodInfo"`
  116. }
  117. func (GoodsTypeOne) TableName() string {
  118. return "xt_goods_type"
  119. }
  120. type XtCancelStockInfo struct {
  121. ID int64 `gorm:"column:id" json:"id"`
  122. GoodId int64 `gorm:"column:good_id" json:"good_id"`
  123. CancelStockId int64 `gorm:"column:cancel_stock_id" json:"cancel_stock_id"`
  124. GoodTypeId int64 `gorm:"column:good_type_id" json:"good_type_id"`
  125. Count int64 `gorm:"column:count" json:"count"`
  126. Price float64 `gorm:"column:price" json:"price"`
  127. Total float64 `gorm:"column:total" json:"total"`
  128. ProductDate int64 `gorm:"column:product_date" json:"product_date"`
  129. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date"`
  130. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  131. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  132. Status int64 `gorm:"column:status" json:"status"`
  133. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  134. OrderNumber string `gorm:"column:order_number" json:"order_number"`
  135. Type int64 `gorm:"column:type" json:"type"`
  136. Dealer string `gorm:"column:dealer" json:"dealer"`
  137. Manufacturer string `gorm:"column:manufacturer" json:"manufacturer"`
  138. GoodInfo GoodInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"GoodInfo"`
  139. Number string `gorm:"column:number" json:"number" form:"number"`
  140. RegisterAccount string `gorm:"column:register_account" json:"register_account" form:"register_account"`
  141. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  142. IsCheck int64 `gorm:"column:is_check" json:"is_check" form:"is_check"`
  143. }
  144. func (XtCancelStockInfo) TableName() string {
  145. return "xt_cancel_stock_info"
  146. }