bill.go 3.2 KB

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