bill.go 3.4 KB

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