good_models.go 6.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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. StockAttribute1 int64 `gorm:"-" json:"stock_attribute" form:"stock_attribute"`
  18. }
  19. func (GoodsType) TableName() string {
  20. return "xt_goods_type"
  21. }
  22. type GoodInfo struct {
  23. ID int64 `gorm:"column:id" json:"id" form:"id"`
  24. GoodCode string `gorm:"column:good_code" json:"good_code" form:"good_code"`
  25. SpecificationName string `gorm:"column:specification_name" json:"specification_name" form:"specification_name"`
  26. GoodTypeId int64 `gorm:"column:good_type_id" json:"good_type_id" form:"good_type_id"`
  27. GoodUnit int64 `gorm:"column:good_unit" json:"good_unit" form:"good_unit"`
  28. BuyPrice float64 `gorm:"column:buy_price" json:"buy_price" form:"buy_price"`
  29. SellPrice float64 `gorm:"column:sell_price" json:"sell_price" form:"sell_price"`
  30. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  31. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  32. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  33. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  34. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  35. ExpiryDateWarnDayCount int64 `gorm:"column:expiry_date_warn_day_count" json:"expiry_date_warn_day_count" form:"expiry_date_warn_day_count"`
  36. StockWarnCount int64 `gorm:"column:stock_warn_count" json:"stock_warn_count" form:"stock_warn_count"`
  37. IsReuse int64 `gorm:"column:is_reuse" json:"is_reuse" form:"is_reuse"`
  38. Status int64 `gorm:"column:status" json:"status" form:"status"`
  39. FilmArea string `gorm:"column:film_area" json:"film_area" form:"film_area"`
  40. IsUse int64 `gorm:"column:is_use" json:"is_use" form:"is_use"`
  41. FilmMaterialQuality string `gorm:"column:film_material_quality" json:"film_material_quality" form:"film_material_quality"`
  42. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  43. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  44. Creater int64 `gorm:"column:creater" json:"creater" form:"creater"`
  45. GoodName string `gorm:"column:good_name" json:"good_name" form:"good_name"`
  46. Pinyin string `gorm:"column:pinyin" json:"pinyin" form:"pinyin"`
  47. Wubi string `gorm:"column:wubi" json:"wubi" form:"wubi"`
  48. GoodKind int64 `gorm:"column:good_kind" json:"good_kind" form:"good_kind"`
  49. MedicalInsuranceLevel int64 `gorm:"column:medical_insurance_level" json:"medical_insurance_level" form:"medical_insurance_level"`
  50. RetailPrice float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
  51. MedicalInsuranceNumber string `gorm:"column:medical_insurance_number" json:"medical_insurance_number" form:"medical_insurance_number"`
  52. ProvincesCode string `gorm:"column:provinces_code" json:"provinces_code" form:"provinces_code"`
  53. Code string `gorm:"column:code" json:"code" form:"code"`
  54. IsSpecialDiseases int64 `gorm:"column:is_special_diseases" json:"is_special_diseases" form:"is_special_diseases"`
  55. IsRecord int64 `gorm:"column:is_record" json:"is_record" form:"is_record"`
  56. StatisticsCategory int64 `gorm:"column:statistics_category" json:"statistics_category" form:"statistics_category"`
  57. GoodStatus string `gorm:"column:good_status" json:"good_status" form:"good_status"`
  58. DefaultCount int64 `gorm:"column:default_count" json:"default_count" form:"default_count"`
  59. Sign int64 `gorm:"column:sign" json:"sign" form:"sign"`
  60. IsDefault int64 `gorm:"column:is_default" json:"is_default" form:"is_default"`
  61. IsChargeUse int64 `gorm:"column:is_charge_use" json:"is_charge_use" form:"is_charge_use"`
  62. IsChargePredict int64 `gorm:"column:is_charge_predict" json:"is_charge_predict" form:"is_charge_predict"`
  63. IsStatisticsWork int64 `gorm:"column:is_statistics_work" json:"is_statistics_work" form:"is_statistics_work"`
  64. Sort int64 `gorm:"column:sort" json:"sort" form:"sort"`
  65. IsDoctorUse int64 `gorm:"column:is_doctor_use" json:"is_doctor_use" form:"is_doctor_use"`
  66. Agent string `gorm:"column:agent" json:"agent" form:"agent"`
  67. GoodNumber string `gorm:"column:good_number" json:"good_number" form:"good_number"`
  68. GoodsType GoodsType `gorm:"ForeignKey:ID;AssociationForeignKey:GoodTypeId" json:"type"`
  69. IsUser int64 `gorm:"column:is_user" json:"is_user" form:"is_user"`
  70. PackingUnit string `gorm:"column:packing_unit" json:"packing_unit" form:"packing_unit"`
  71. Number string `gorm:"column:number" json:"number" form:"number"`
  72. }
  73. func (GoodInfo) TableName() string {
  74. return "xt_good_information"
  75. }
  76. type GoodsTypeOne struct {
  77. ID int64 `gorm:"column:id" json:"id"`
  78. TypeCode string `gorm:"column:type_code" json:"type_code"`
  79. TypeName string `gorm:"column:type_name" json:"type_name"`
  80. Remark string `gorm:"column:remark" json:"remark"`
  81. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  82. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  83. Creater int64 `gorm:"column:creater" json:"creater"`
  84. Modifier int64 `gorm:"column:modifier" json:"modifier"`
  85. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  86. Status int64 `gorm:"column:status" json:"status"`
  87. Type int64 `gorm:"column:type" json:"type"`
  88. Number int64 `gorm:"column:number" json:"number"`
  89. OutStock int64 `gorm:"column:out_stock" json:"out_stock" form:"out_stock"`
  90. StockAttribute int64 `gorm:"column:stock_attribute" json:"stock_attribute" form:"stock_attribute"`
  91. GoodInfo []*GoodInfo `gorm:"ForeignKey:GoodTypeId;AssociationForeignKey:ID" json:"GoodInfo"`
  92. }
  93. func (GoodsTypeOne) TableName() string {
  94. return "xt_goods_type"
  95. }