bill.go 4.1 KB

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