bill.go 3.5 KB

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