good_models.go 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  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. WarehousingInfoOne []*StartWarehousingInfo `gorm:"json:"warehouse_info"` //期间增加
  89. WarehousingInfoStart []*StartWarehousingInfo `gorm:"json:"warehouse_info_start"`
  90. WarehousingInfoEnd []*StartWarehousingInfo `gorm:"json:"warehouse_info_end"`
  91. WarehousingInfo []*WarehousingInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"warehouse_info"`
  92. WarehouseOutInfo []*WarehouseOutInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"warehouse_out_info"`
  93. WarehouseOutInfoEnd []*VmStockFlow
  94. WarehouseOutInfoStart []*VmStockFlow
  95. WarehouseInfoEnd []*VmStockFlow //期末入库量
  96. StartFlowWarehouseInfo []*VmStockFlow //本期增加
  97. //期初结余
  98. StartFlowInfo []*VmStockFlow
  99. StartOutFlowInfo []*VmStockFlow
  100. //期末结余
  101. EndFlowInfo []*VmStockFlow
  102. EndFlowOutInfo []*VmStockFlow
  103. //期初退库
  104. StartCancelFlowInfo []*VmStockFlow
  105. //期末退库
  106. EndCancelFLowInfo []*VmStockFlow
  107. StartEndCancelFLowInfo []*VmStockFlow
  108. WareStartStockInventoryProfit []*VmStockFlow //期初盘盈
  109. WareStartStockInventoryLosses []*VmStockFlow //期初盘亏
  110. WareEndStockInventoryProfit []*VmStockFlow //期末盘盈
  111. WareEndStockInventoryLosses []*VmStockFlow //期末盘亏
  112. WareStartEndStockInventoryProfit []*VmStockFlow //期间盘盈
  113. WareStartEndStockInventoryLosses []*VmStockFlow //期间盘亏
  114. SumOutCount int64 `gorm:"column:sum_out_count" json:"sum_out_count" form:"sum_out_count"`
  115. SumCancelCount int64 `gorm:"column:sum_cancel_count" json:"sum_cancel_count" form:"sum_cancel_count"`
  116. TotalCount int64 `gorm:"column:total_count" json:"total_count" form:"total_count"`
  117. }
  118. func (GoodInfo) TableName() string {
  119. return "xt_good_information"
  120. }
  121. type GoodInfoSeven struct {
  122. ID int64 `gorm:"column:id" json:"id" form:"id"`
  123. GoodName string `gorm:"column:good_name" json:"good_name" form:"good_name"`
  124. }
  125. func (GoodInfoSeven) TableName() string {
  126. return "xt_good_information"
  127. }
  128. type GoodsTypeOne struct {
  129. ID int64 `gorm:"column:id" json:"id"`
  130. TypeCode string `gorm:"column:type_code" json:"type_code"`
  131. TypeName string `gorm:"column:type_name" json:"type_name"`
  132. Remark string `gorm:"column:remark" json:"remark"`
  133. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  134. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  135. Creater int64 `gorm:"column:creater" json:"creater"`
  136. Modifier int64 `gorm:"column:modifier" json:"modifier"`
  137. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  138. Status int64 `gorm:"column:status" json:"status"`
  139. Type int64 `gorm:"column:type" json:"type"`
  140. Number int64 `gorm:"column:number" json:"number"`
  141. OutStock int64 `gorm:"column:out_stock" json:"out_stock" form:"out_stock"`
  142. StockAttribute int64 `gorm:"column:stock_attribute" json:"stock_attribute" form:"stock_attribute"`
  143. GoodInfo []*GoodInfo `gorm:"ForeignKey:GoodTypeId;AssociationForeignKey:ID" json:"GoodInfo"`
  144. }
  145. func (GoodsTypeOne) TableName() string {
  146. return "xt_goods_type"
  147. }
  148. type XtCancelStockInfo struct {
  149. ID int64 `gorm:"column:id" json:"id"`
  150. GoodId int64 `gorm:"column:good_id" json:"good_id"`
  151. CancelStockId int64 `gorm:"column:cancel_stock_id" json:"cancel_stock_id"`
  152. GoodTypeId int64 `gorm:"column:good_type_id" json:"good_type_id"`
  153. Count int64 `gorm:"column:count" json:"count"`
  154. Price float64 `gorm:"column:price" json:"price"`
  155. Total float64 `gorm:"column:total" json:"total"`
  156. ProductDate int64 `gorm:"column:product_date" json:"product_date"`
  157. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date"`
  158. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  159. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  160. Status int64 `gorm:"column:status" json:"status"`
  161. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  162. OrderNumber string `gorm:"column:order_number" json:"order_number"`
  163. Type int64 `gorm:"column:type" json:"type"`
  164. Dealer string `gorm:"column:dealer" json:"dealer"`
  165. Manufacturer string `gorm:"column:manufacturer" json:"manufacturer"`
  166. GoodInfo GoodInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"GoodInfo"`
  167. Number string `gorm:"column:number" json:"number" form:"number"`
  168. RegisterAccount string `gorm:"column:register_account" json:"register_account" form:"register_account"`
  169. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  170. IsCheck int64 `gorm:"column:is_check" json:"is_check" form:"is_check"`
  171. }
  172. func (XtCancelStockInfo) TableName() string {
  173. return "xt_cancel_stock_info"
  174. }