bill.go 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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 string `bson:"price,omitempty" json:"price"`
  17. Price2 string `bson:"price2,omitempty" json:"price2"`
  18. PriceUnit string `bson:"priceUnit,omitempty" json:"priceUnit"`
  19. Price2Unit string `bson:"price2Unit,omitempty" json:"price2Unit"`
  20. //数量
  21. Count int `bson:"count,omitempty" json:"count"`
  22. //备注
  23. Remark string `bson:"remark,omitempty" json:"remark"`
  24. //交货时间
  25. DeliveryTime time.Time `bson:"deliveryTime,omitempty" json:"deliveryTime"`
  26. }
  27. type PurchaseBill struct {
  28. Id primitive.ObjectID `bson:"_id,omitempty" json:"_id"`
  29. PackId primitive.ObjectID `bson:"packId,omitempty" json:"packId"`
  30. PlanId primitive.ObjectID `bson:"planId,omitempty" json:"planId"`
  31. SupplierId primitive.ObjectID `bson:"supplierId,omitempty" json:"supplierId"`
  32. //类别
  33. Type string `bson:"type,omitempty" json:"type"`
  34. // 进行中 created 已完成 complete 已弃用 deprecated 已审核 reviewed
  35. Status string `bson:"status,omitempty" json:"status"`
  36. Reviewed int `bson:"reviewed,omitempty" json:"reviewed"` // -1 代表未审核 1已审核
  37. SignUsers []primitive.ObjectID `bson:"signUsers,omitempty" json:"signUsers"` // 多个签名人
  38. CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"`
  39. UpdateTime time.Time `bson:"updateTime,omitempty" json:"updateTime"`
  40. CompleteTime time.Time `bson:"completeTime,omitempty" json:"completeTime"`
  41. //供应商
  42. Supplier string `bson:"supplier,omitempty" json:"supplier"`
  43. //送货地址
  44. SendTo string `bson:"sendTo,omitempty" json:"sendTo"`
  45. //商品名字
  46. ProductName string `bson:"productName,omitempty" json:"productName"`
  47. //确认收货数量
  48. ConfirmCount int `bson:"confirmCount,omitempty" json:"confirmCount"`
  49. //纸张类采购
  50. Paper []*PaperBill `bson:"papers,omitempty" json:"papers"`
  51. // 序号
  52. SerialNumber string `bson:"serialNumber,omitempty" json:"serialNumber"`
  53. }
  54. // 工艺生产数据
  55. type ProduceBillData struct {
  56. //名字
  57. Name string `bson:"name,omitempty" json:"name"`
  58. //规格(质量要求)
  59. Norm string `bson:"norm,omitempty" json:"norm"`
  60. //单价 数量
  61. Price string `bson:"price,omitempty" json:"price"`
  62. Price2 string `bson:"price2,omitempty" json:"price2"`
  63. //数量
  64. Count int `bson:"count,omitempty" json:"count"`
  65. //备注
  66. Remark string `bson:"remark,omitempty" json:"remark"`
  67. //纸张
  68. Paper string `bson:"paper,omitempty" json:"paper"`
  69. //来纸尺寸
  70. PaperSize string `bson:"paperSize,omitempty" json:"paperSize"`
  71. //印刷尺寸
  72. PrintSize string `bson:"printSize,omitempty" json:"printSize"`
  73. //交货时间
  74. DeliveryTime time.Time `bson:"deliveryTime,omitempty" json:"deliveryTime"`
  75. }
  76. type ProduceBill struct {
  77. Id primitive.ObjectID `bson:"_id,omitempty" json:"_id"`
  78. PackId primitive.ObjectID `bson:"packId,omitempty" json:"packId"`
  79. PlanId primitive.ObjectID `bson:"planId,omitempty" json:"planId"`
  80. SupplierId primitive.ObjectID `bson:"supplierId,omitempty" json:"supplierId"`
  81. //类别
  82. Type string `bson:"type,omitempty" json:"type"`
  83. // 进行中 created 已完成 complete 已弃用 deprecated
  84. Status string `bson:"status,omitempty" json:"status"`
  85. Reviewed int `bson:"reviewed,omitempty" json:"reviewed"` // -1 代表未审核 1已审核
  86. SignUsers []primitive.ObjectID `bson:"signUsers,omitempty" json:"signUsers"` // 多个签名人
  87. CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"`
  88. UpdateTime time.Time `bson:"updateTime,omitempty" json:"updateTime"`
  89. CompleteTime time.Time `bson:"completeTime,omitempty" json:"completeTime"`
  90. //确认收货数量
  91. ConfirmCount int `bson:"confirmCount,omitempty" json:"confirmCount"`
  92. //供应商
  93. Supplier string `bson:"supplier,omitempty" json:"supplier"`
  94. //送货地址
  95. SendTo string `bson:"sendTo,omitempty" json:"sendTo"`
  96. //商品名字
  97. ProductName string `bson:"productName,omitempty" json:"productName"`
  98. //纸张类采购
  99. Produces []*ProduceBillData `bson:"produces,omitempty" json:"produces"`
  100. // 序号
  101. SerialNumber string `bson:"serialNumber,omitempty" json:"serialNumber"`
  102. }