bill.go 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. package model
  2. import (
  3. "time"
  4. "go.mongodb.org/mongo-driver/bson/primitive"
  5. )
  6. // 采购单
  7. type PaperBill struct {
  8. //名字
  9. Name string `bson:"name,omitempty" json:"name"`
  10. //规格
  11. Norm string `bson:"norm,omitempty" json:"norm"`
  12. //宽
  13. Width string `bson:"width,omitempty" json:"width"`
  14. //长
  15. Height string `bson:"height,omitempty" json:"height"`
  16. Price float64 `bson:"price,omitempty" json:"price"`
  17. Price2 float64 `bson:"price2,omitempty" json:"price2"`
  18. PriceUnit string `bson:"priceUnit,omitempty" json:"priceUnit"`
  19. Price2Unit string `bson:"price2Unit,omitempty" json:"price2Unit"`
  20. // 下单数量
  21. OrderCount int `bson:"orderCount,omitempty" json:"orderCount"`
  22. // 下单单价
  23. OrderPrice float64 `bson:"orderPrice,omitempty" json:"orderPrice"`
  24. //备注
  25. Remark string `bson:"remark,omitempty" json:"remark"`
  26. //备注
  27. ConfirmCount int `bson:"confirmCount,omitempty" json:"confirmCount"`
  28. //交货时间
  29. DeliveryTime time.Time `bson:"deliveryTime,omitempty" json:"deliveryTime"`
  30. }
  31. type PurchaseBill struct {
  32. Id primitive.ObjectID `bson:"_id,omitempty" json:"_id"`
  33. PackId primitive.ObjectID `bson:"packId,omitempty" json:"packId"`
  34. PlanId primitive.ObjectID `bson:"planId,omitempty" json:"planId"`
  35. SupplierId primitive.ObjectID `bson:"supplierId,omitempty" json:"supplierId"`
  36. UserId primitive.ObjectID `bson:"userId,omitempty" json:"userId"`
  37. UserName string `bson:"userName,omitempty" json:"userName"`
  38. //类别
  39. Type string `bson:"type,omitempty" json:"type"`
  40. // 进行中 created 已完成 complete 已弃用 deprecated 已审核 reviewed
  41. Status string `bson:"status,omitempty" json:"status"`
  42. Reviewed int `bson:"reviewed,omitempty" json:"reviewed"` // -1 代表未审核 1已审核
  43. SignUsers []primitive.ObjectID `bson:"signUsers,omitempty" json:"signUsers"` // 多个签名人
  44. CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"`
  45. UpdateTime time.Time `bson:"updateTime,omitempty" json:"updateTime"`
  46. CompleteTime time.Time `bson:"completeTime,omitempty" json:"completeTime"`
  47. //供应商
  48. Supplier string `bson:"supplier,omitempty" json:"supplier"`
  49. //送货地址
  50. SendTo string `bson:"sendTo,omitempty" json:"sendTo"`
  51. //商品名字
  52. ProductName string `bson:"productName,omitempty" json:"productName"`
  53. //纸张类采购
  54. Paper []*PaperBill `bson:"papers,omitempty" json:"papers"`
  55. // 序号
  56. SerialNumber string `bson:"serialNumber,omitempty" json:"serialNumber"`
  57. Remark string `bson:"remark,omitempty" json:"remark"`
  58. }
  59. // 工艺生产数据
  60. type ProduceBillData struct {
  61. //名字
  62. Name string `bson:"name,omitempty" json:"name"`
  63. //规格(质量要求)
  64. Norm string `bson:"norm,omitempty" json:"norm"`
  65. //单价 数量
  66. Price float64 `bson:"price,omitempty" json:"price"`
  67. Price2 float64 `bson:"price2,omitempty" json:"price2"`
  68. // 下单数量
  69. OrderCount int `bson:"orderCount,omitempty" json:"orderCount"`
  70. // 下单单价
  71. OrderPrice float64 `bson:"orderPrice,omitempty" json:"orderPrice"`
  72. // 确认收货数量
  73. ConfirmCount int `bson:"confirmCount,omitempty" json:"confirmCount"`
  74. //备注
  75. Remark string `bson:"remark,omitempty" json:"remark"`
  76. //纸张
  77. Paper string `bson:"paper,omitempty" json:"paper"`
  78. //来纸尺寸
  79. PaperSize string `bson:"paperSize,omitempty" json:"paperSize"`
  80. //印刷尺寸
  81. PrintSize string `bson:"printSize,omitempty" json:"printSize"`
  82. //交货时间
  83. DeliveryTime time.Time `bson:"deliveryTime,omitempty" json:"deliveryTime"`
  84. // 确认收货数量
  85. BatchCount int `bson:"batchCount,omitempty" json:"batchCount"`
  86. // 工艺数量
  87. CraftNum int `bson:"craftNum,omitempty" json:"craftNum"`
  88. }
  89. type ProduceBill struct {
  90. Id primitive.ObjectID `bson:"_id,omitempty" json:"_id"`
  91. PackId primitive.ObjectID `bson:"packId,omitempty" json:"packId"`
  92. PlanId primitive.ObjectID `bson:"planId,omitempty" json:"planId"`
  93. SupplierId primitive.ObjectID `bson:"supplierId,omitempty" json:"supplierId"`
  94. UserId primitive.ObjectID `bson:"userId,omitempty" json:"userId"`
  95. UserName string `bson:"userName,omitempty" json:"userName"`
  96. // 类别
  97. Type string `bson:"type,omitempty" json:"type"`
  98. // 进行中 created 已完成 complete 已弃用 deprecated
  99. Status string `bson:"status,omitempty" json:"status"`
  100. Reviewed int `bson:"reviewed,omitempty" json:"reviewed"` // -1 代表未审核 1已审核
  101. SignUsers []primitive.ObjectID `bson:"signUsers,omitempty" json:"signUsers"` // 多个签名人
  102. CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"`
  103. UpdateTime time.Time `bson:"updateTime,omitempty" json:"updateTime"`
  104. CompleteTime time.Time `bson:"completeTime,omitempty" json:"completeTime"`
  105. //供应商
  106. Supplier string `bson:"supplier,omitempty" json:"supplier"`
  107. //送货地址
  108. SendTo string `bson:"sendTo,omitempty" json:"sendTo"`
  109. //商品名字
  110. ProductName string `bson:"productName,omitempty" json:"productName"`
  111. //纸张类采购
  112. Produces []*ProduceBillData `bson:"produces,omitempty" json:"produces"`
  113. // 序号
  114. SerialNumber string `bson:"serialNumber,omitempty" json:"serialNumber"`
  115. }
  116. // 成品采购单据
  117. type ProductBill struct {
  118. Id primitive.ObjectID `bson:"_id,omitempty" json:"_id"`
  119. PackId primitive.ObjectID `bson:"packId,omitempty" json:"packId"`
  120. PlanId primitive.ObjectID `bson:"planId,omitempty" json:"planId"`
  121. SupplierId primitive.ObjectID `bson:"supplierId,omitempty" json:"supplierId"`
  122. UserId primitive.ObjectID `bson:"userId,omitempty" json:"userId"`
  123. UserName string `bson:"userName,omitempty" json:"userName"`
  124. // 类别
  125. Type string `bson:"type,omitempty" json:"type"`
  126. // 进行中 created 已完成 complete 已弃用 deprecated
  127. Status string `bson:"status,omitempty" json:"status"`
  128. Reviewed int `bson:"reviewed,omitempty" json:"reviewed"` // -1 代表未审核 1已审核
  129. SignUsers []primitive.ObjectID `bson:"signUsers,omitempty" json:"signUsers"` // 多个签名人
  130. CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"`
  131. UpdateTime time.Time `bson:"updateTime,omitempty" json:"updateTime"`
  132. CompleteTime time.Time `bson:"completeTime,omitempty" json:"completeTime"`
  133. //供应商
  134. Supplier string `bson:"supplier,omitempty" json:"supplier"`
  135. //送货地址
  136. SendTo string `bson:"sendTo,omitempty" json:"sendTo"`
  137. //商品名字
  138. ProductName string `bson:"productName,omitempty" json:"productName"`
  139. //有哪些成品采购数据
  140. Products []*ProductBillData `bson:"products,omitempty" json:"products"`
  141. // 序号
  142. SerialNumber string `bson:"serialNumber,omitempty" json:"serialNumber"`
  143. //备注
  144. Remark string `bson:"remark,omitempty" json:"remark"`
  145. }
  146. // 工艺生产数据
  147. type ProductBillData struct {
  148. //名字
  149. Name string `bson:"name,omitempty" json:"name"`
  150. //规格(质量要求)
  151. Norm string `bson:"norm,omitempty" json:"norm"`
  152. //单价 数量
  153. Price float64 `bson:"price,omitempty" json:"price"`
  154. // 下单数量
  155. OrderCount int `bson:"orderCount,omitempty" json:"orderCount"`
  156. // 下单单价
  157. OrderPrice float64 `bson:"orderPrice,omitempty" json:"orderPrice"`
  158. //备注
  159. Remark string `bson:"remark,omitempty" json:"remark"`
  160. //交货时间
  161. DeliveryTime time.Time `bson:"deliveryTime,omitempty" json:"deliveryTime"`
  162. // 确认收货数量
  163. ConfirmCount int `bson:"confirmCount,omitempty" json:"confirmCount"`
  164. //纸张
  165. Unit string `bson:"unit,omitempty" json:"unit"`
  166. }