good_models.go 22KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  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. IsOpen int64 `gorm:"column:is_open" json:"is_open" form:"is_open"`
  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. IsSpecialDiseases int64 `gorm:"column:is_special_diseases" json:"is_special_diseases" form:"is_special_diseases"`
  54. IsRecord int64 `gorm:"column:is_record" json:"is_record" form:"is_record"`
  55. StatisticsCategory int64 `gorm:"column:statistics_category" json:"statistics_category" form:"statistics_category"`
  56. GoodStatus string `gorm:"column:good_status" json:"good_status" form:"good_status"`
  57. DefaultCount int64 `gorm:"column:default_count" json:"default_count" form:"default_count"`
  58. Sign int64 `gorm:"column:sign" json:"sign" form:"sign"`
  59. IsDefault int64 `gorm:"column:is_default" json:"is_default" form:"is_default"`
  60. IsChargeUse int64 `gorm:"column:is_charge_use" json:"is_charge_use" form:"is_charge_use"`
  61. IsChargePredict int64 `gorm:"column:is_charge_predict" json:"is_charge_predict" form:"is_charge_predict"`
  62. IsStatisticsWork int64 `gorm:"column:is_statistics_work" json:"is_statistics_work" form:"is_statistics_work"`
  63. Sort int64 `gorm:"column:sort" json:"sort" form:"sort"`
  64. IsDoctorUse int64 `gorm:"column:is_doctor_use" json:"is_doctor_use" form:"is_doctor_use"`
  65. Agent string `gorm:"column:agent" json:"agent" form:"agent"`
  66. GoodNumber string `gorm:"column:good_number" json:"good_number" form:"good_number"`
  67. GoodsType GoodsType `gorm:"ForeignKey:ID;AssociationForeignKey:GoodTypeId" json:"type"`
  68. CommdityCode string `gorm:"column:commdity_code" json:"commdity_code" form:"commdity_code"`
  69. SocialSecurityDirectoryCode string `gorm:"column:social_security_directory_code" json:"social_security_directory_code" form:"social_security_directory_code"`
  70. ProductionType string `gorm:"column:production_type" json:"production_type" form:"production_type"`
  71. SpecialMedical string `gorm:"column:special_medical" json:"special_medical" form:"special_medical"`
  72. IsMark int64 `gorm:"column:is_mark" json:"is_mark" form:"is_mark"`
  73. MinNumber int64 `gorm:"column:min_number" json:"min_number" form:"min_number"`
  74. PackingUnit string `gorm:"column:packing_unit" json:"packing_unit" form:"packing_unit"`
  75. PackingPrice float64 `gorm:"column:packing_price" json:"packing_price" form:"packing_price"`
  76. DefaultCountUnit string `gorm:"column:default_count_unit" json:"default_count_unit" form:"default_count_unit"`
  77. MinUnit string `gorm:"column:min_unit" json:"min_unit" form:"min_unit"`
  78. Total float64 `gorm:"column:total" json:"total" form:"total"`
  79. StWarehousingInfo []*StWarehousingInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"xt_warehouse_info"`
  80. CancelStockInfo []*CancelStockInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"cancel_stock_info"`
  81. RegisterNumber string `gorm:"column:register_number" json:"register_number" form:"register_number"`
  82. GoodSotckInfo []*GoodSotckInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"good_stock_in"`
  83. IsUser int64 `gorm:"column:is_user" json:"is_user" form:"is_user"`
  84. Number string `gorm:"column:number" json:"number" form:"number"`
  85. IsWarehouse int64 `gorm:"column:is_warehouse" json:"is_warehouse" form:"is_warehouse"`
  86. SumCount int64 `gorm:"column:sum_count" json:"sum_count" form:"sum_count"`
  87. BatchRetaiPrice float64 `gorm:"column:batch_retai_price" json:"batch_retai_price" form:"batch_retai_price"`
  88. SumInCount int64 `gorm:"column:sum_in_count" json:"sum_in_count" form:"sum_in_count"`
  89. WarehousingInfoOne []*StartWarehousingInfo `gorm:"json:"warehouse_info"` //期间增加
  90. WarehousingInfoStart []*StartWarehousingInfo `gorm:"json:"warehouse_info_start"`
  91. WarehousingInfoEnd []*StartWarehousingInfo `gorm:"json:"warehouse_info_end"`
  92. WarehousingInfo []*WarehousingInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"warehouse_info"`
  93. WarehouseOutInfo []*WarehouseOutInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"warehouse_out_info"`
  94. WarehouseOutInfoEnd []*VmStockFlow
  95. WarehouseOutInfoStart []*VmStockFlow
  96. WarehouseInfoEnd []*VmStockFlow //期末入库量
  97. StartFlowWarehouseInfo []*VmStockFlow //本期增加
  98. //期初结余
  99. StartFlowInfo []*VmStockFlow
  100. StartOutFlowInfo []*VmStockFlow
  101. //期末结余
  102. EndFlowInfo []*VmStockFlow
  103. EndFlowOutInfo []*VmStockFlow
  104. //期初退库
  105. StartCancelFlowInfo []*VmStockFlow
  106. //期末退库
  107. EndCancelFLowInfo []*VmStockFlow
  108. StartEndCancelFLowInfo []*VmStockFlow
  109. WareStartStockInventoryProfit []*VmStockFlow //期初盘盈
  110. WareStartStockInventoryLosses []*VmStockFlow //期初盘亏
  111. WareEndStockInventoryProfit []*VmStockFlow //期末盘盈
  112. WareEndStockInventoryLosses []*VmStockFlow //期末盘亏
  113. WareStartEndStockInventoryProfit []*VmStockFlow //期间盘盈
  114. WareStartEndStockInventoryLosses []*VmStockFlow //期间盘亏
  115. SumOutCount int64 `gorm:"column:sum_out_count" json:"sum_out_count" form:"sum_out_count"`
  116. SumCancelCount int64 `gorm:"column:sum_cancel_count" json:"sum_cancel_count" form:"sum_cancel_count"`
  117. TotalCount int64 `gorm:"column:total_count" json:"total_count" form:"total_count"`
  118. }
  119. func (GoodInfo) TableName() string {
  120. return "xt_good_information"
  121. }
  122. type GoodInfoSeven struct {
  123. ID int64 `gorm:"column:id" json:"id" form:"id"`
  124. GoodName string `gorm:"column:good_name" json:"good_name" form:"good_name"`
  125. }
  126. func (GoodInfoSeven) TableName() string {
  127. return "xt_good_information"
  128. }
  129. type GoodsTypeOne struct {
  130. ID int64 `gorm:"column:id" json:"id"`
  131. TypeCode string `gorm:"column:type_code" json:"type_code"`
  132. TypeName string `gorm:"column:type_name" json:"type_name"`
  133. Remark string `gorm:"column:remark" json:"remark"`
  134. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  135. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  136. Creater int64 `gorm:"column:creater" json:"creater"`
  137. Modifier int64 `gorm:"column:modifier" json:"modifier"`
  138. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  139. Status int64 `gorm:"column:status" json:"status"`
  140. Type int64 `gorm:"column:type" json:"type"`
  141. Number int64 `gorm:"column:number" json:"number"`
  142. OutStock int64 `gorm:"column:out_stock" json:"out_stock" form:"out_stock"`
  143. StockAttribute int64 `gorm:"column:stock_attribute" json:"stock_attribute" form:"stock_attribute"`
  144. GoodInfo []*GoodInformationThirty `gorm:"ForeignKey:GoodTypeId;AssociationForeignKey:ID" json:"GoodInfo"`
  145. }
  146. func (GoodsTypeOne) TableName() string {
  147. return "xt_goods_type"
  148. }
  149. type XtCancelStockInfo struct {
  150. ID int64 `gorm:"column:id" json:"id"`
  151. GoodId int64 `gorm:"column:good_id" json:"good_id"`
  152. CancelStockId int64 `gorm:"column:cancel_stock_id" json:"cancel_stock_id"`
  153. GoodTypeId int64 `gorm:"column:good_type_id" json:"good_type_id"`
  154. Count int64 `gorm:"column:count" json:"count"`
  155. Price float64 `gorm:"column:price" json:"price"`
  156. Total float64 `gorm:"column:total" json:"total"`
  157. ProductDate int64 `gorm:"column:product_date" json:"product_date"`
  158. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date"`
  159. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  160. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  161. Status int64 `gorm:"column:status" json:"status"`
  162. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  163. OrderNumber string `gorm:"column:order_number" json:"order_number"`
  164. Type int64 `gorm:"column:type" json:"type"`
  165. Dealer string `gorm:"column:dealer" json:"dealer"`
  166. Manufacturer string `gorm:"column:manufacturer" json:"manufacturer"`
  167. GoodInfo GoodInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"GoodInfo"`
  168. Number string `gorm:"column:number" json:"number" form:"number"`
  169. RegisterAccount string `gorm:"column:register_account" json:"register_account" form:"register_account"`
  170. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  171. IsCheck int64 `gorm:"column:is_check" json:"is_check" form:"is_check"`
  172. }
  173. func (XtCancelStockInfo) TableName() string {
  174. return "xt_cancel_stock_info"
  175. }
  176. type BloodGoodsType struct {
  177. ID int64 `gorm:"column:id" json:"id"`
  178. TypeCode string `gorm:"column:type_code" json:"type_code"`
  179. TypeName string `gorm:"column:type_name" json:"type_name"`
  180. Remark string `gorm:"column:remark" json:"remark"`
  181. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  182. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  183. Creater int64 `gorm:"column:creater" json:"creater"`
  184. Modifier int64 `gorm:"column:modifier" json:"modifier"`
  185. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  186. Status int64 `gorm:"column:status" json:"status"`
  187. Type int64 `gorm:"column:type" json:"type"`
  188. Number int64 `gorm:"column:number" json:"number"`
  189. OutStock int64 `gorm:"column:out_stock" json:"out_stock" form:"out_stock"`
  190. StockAttribute int64 `gorm:"column:stock_attribute" json:"stock_attribute" form:"stock_attribute"`
  191. IsOpen int64 `gorm:"column:is_open" json:"is_open" form:"is_open"`
  192. }
  193. func (BloodGoodsType) TableName() string {
  194. return "xt_goods_type"
  195. }
  196. type GoodInformationThirty struct {
  197. ID int64 `gorm:"column:id" json:"id" form:"id"`
  198. GoodCode string `gorm:"column:good_code" json:"good_code" form:"good_code"`
  199. SpecificationName string `gorm:"column:specification_name" json:"specification_name" form:"specification_name"`
  200. GoodTypeId int64 `gorm:"column:good_type_id" json:"good_type_id" form:"good_type_id"`
  201. GoodUnit int64 `gorm:"column:good_unit" json:"good_unit" form:"good_unit"`
  202. BuyPrice float64 `gorm:"column:buy_price" json:"buy_price" form:"buy_price"`
  203. SellPrice float64 `gorm:"column:sell_price" json:"sell_price" form:"sell_price"`
  204. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  205. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  206. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  207. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  208. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  209. ExpiryDateWarnDayCount int64 `gorm:"column:expiry_date_warn_day_count" json:"expiry_date_warn_day_count" form:"expiry_date_warn_day_count"`
  210. StockWarnCount int64 `gorm:"column:stock_warn_count" json:"stock_warn_count" form:"stock_warn_count"`
  211. IsReuse int64 `gorm:"column:is_reuse" json:"is_reuse" form:"is_reuse"`
  212. Status int64 `gorm:"column:status" json:"status" form:"status"`
  213. FilmArea string `gorm:"column:film_area" json:"film_area" form:"film_area"`
  214. IsUse int64 `gorm:"column:is_use" json:"is_use" form:"is_use"`
  215. FilmMaterialQuality string `gorm:"column:film_material_quality" json:"film_material_quality" form:"film_material_quality"`
  216. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  217. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  218. Creater int64 `gorm:"column:creater" json:"creater" form:"creater"`
  219. GoodName string `gorm:"column:good_name" json:"good_name" form:"good_name"`
  220. Pinyin string `gorm:"column:pinyin" json:"pinyin" form:"pinyin"`
  221. Wubi string `gorm:"column:wubi" json:"wubi" form:"wubi"`
  222. GoodKind int64 `gorm:"column:good_kind" json:"good_kind" form:"good_kind"`
  223. MedicalInsuranceLevel int64 `gorm:"column:medical_insurance_level" json:"medical_insurance_level" form:"medical_insurance_level"`
  224. RetailPrice float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
  225. MedicalInsuranceNumber string `gorm:"column:medical_insurance_number" json:"medical_insurance_number" form:"medical_insurance_number"`
  226. IsSpecialDiseases int64 `gorm:"column:is_special_diseases" json:"is_special_diseases" form:"is_special_diseases"`
  227. IsRecord int64 `gorm:"column:is_record" json:"is_record" form:"is_record"`
  228. StatisticsCategory int64 `gorm:"column:statistics_category" json:"statistics_category" form:"statistics_category"`
  229. GoodStatus string `gorm:"column:good_status" json:"good_status" form:"good_status"`
  230. DefaultCount int64 `gorm:"column:default_count" json:"default_count" form:"default_count"`
  231. IsDefault int64 `gorm:"column:is_default" json:"is_default" form:"is_default"`
  232. IsChargeUse int64 `gorm:"column:is_charge_use" json:"is_charge_use" form:"is_charge_use"`
  233. IsChargePredict int64 `gorm:"column:is_charge_predict" json:"is_charge_predict" form:"is_charge_predict"`
  234. IsStatisticsWork int64 `gorm:"column:is_statistics_work" json:"is_statistics_work" form:"is_statistics_work"`
  235. Sign int64 `gorm:"column:sign" json:"sign" form:"sign"`
  236. Sort int64 `gorm:"column:sort" json:"sort" form:"sort"`
  237. IsDoctorUse int64 `gorm:"column:is_doctor_use" json:"is_doctor_use" form:"is_doctor_use"`
  238. Agent string `gorm:"column:agent" json:"agent" form:"agent"`
  239. GoodNumber string `gorm:"column:good_number" json:"good_number" form:"good_number"`
  240. CommdityCode string `gorm:"column:commdity_code" json:"commdity_code" form:"commdity_code"`
  241. SocialSecurityDirectoryCode string `gorm:"column:social_security_directory_code" json:"social_security_directory_code" form:"social_security_directory_code"`
  242. ProductionType string `gorm:"column:production_type" json:"production_type" form:"production_type"`
  243. SpecialMedical string `gorm:"column:special_medical" json:"special_medical" form:"special_medical"`
  244. IsMark int64 `gorm:"column:is_mark" json:"is_mark" form:"is_mark"`
  245. Total float64 `gorm:"column:total" json:"total" form:"total"`
  246. MinNumber int64 `gorm:"column:min_number" json:"min_number" form:"min_number"`
  247. PackingUnit string `gorm:"column:packing_unit" json:"packing_unit" form:"packing_unit"`
  248. PackingPrice float64 `gorm:"column:packing_price" json:"packing_price" form:"packing_price"`
  249. DefaultCountUnit string `gorm:"column:default_count_unit" json:"default_count_unit" form:"default_count_unit"`
  250. MinUnit string `gorm:"column:min_unit" json:"min_unit" form:"min_unit"`
  251. RegisterNumber string `gorm:"column:register_number" json:"register_number" form:"register_number"`
  252. ProvincesCode string `gorm:"column:provinces_code" json:"provinces_code" form:"provinces_code"`
  253. IsUser int64 `gorm:"column:is_user" json:"is_user" form:"is_user"`
  254. Number string `gorm:"column:number" json:"number" form:"number"`
  255. IsWarehouse string `gorm:"column:is_warehouse" json:"is_warehouse" form:"is_warehouse"`
  256. BatchRetaiPrice float64 `gorm:"column:batch_retai_price" json:"batch_retai_price" form:"batch_retai_price"`
  257. SumCount int64 `gorm:"column:sum_count" json:"sum_count" form:"sum_count"`
  258. SumInCount int64 `gorm:"column:sum_in_count" json:"sum_in_count" form:"sum_in_count"`
  259. TotalCount int64 `gorm:"column:total_count" json:"total_count" form:"total_count"`
  260. SumOutCount int64 `gorm:"column:sum_out_count" json:"sum_out_count" form:"sum_out_count"`
  261. SumCancelCount int64 `gorm:"column:sum_cancel_count" json:"sum_cancel_count" form:"sum_cancel_count"`
  262. }
  263. func (GoodInformationThirty) TableName() string {
  264. return "xt_good_information"
  265. }
  266. type GoodInformationFourty struct {
  267. ID int64 `gorm:"column:id" json:"id" form:"id"`
  268. SpecificationName string `gorm:"column:specification_name" json:"specification_name" form:"specification_name"`
  269. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  270. GoodName string `gorm:"column:good_name" json:"good_name" form:"good_name"`
  271. Status int64 `gorm:"column:status" json:"status"`
  272. }
  273. func (GoodInformationFourty) TableName() string {
  274. return "xt_good_information"
  275. }