bill.go 3.1 KB

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