plan.go 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. package model
  2. import (
  3. "time"
  4. "go.mongodb.org/mongo-driver/bson/primitive"
  5. )
  6. // 生产计划
  7. type ProductPlan struct {
  8. Id primitive.ObjectID `bson:"_id,omitempty" json:"_id"`
  9. Pack *Pack `bson:"pack,omitempty" json:"pack"`
  10. Thumbnail string
  11. Name string
  12. CreateUser string
  13. //生产数量
  14. Total int
  15. //状态
  16. State string
  17. //总价
  18. TotalPrice float64
  19. UpdateTime time.Time
  20. CreateTime time.Time
  21. //所有包装部件的工序
  22. Components []*PackComp
  23. }
  24. type PackComp struct {
  25. Id primitive.ObjectID //包装部件I
  26. Steps []*ProductUnit //生产的工序列表
  27. }
  28. // 工序单位
  29. type ProductUnit struct {
  30. Id string //工序Id
  31. Type string //mat craft process
  32. TypeId string //type类型对应的Id
  33. CraftNorm *CraftNorm //生产工艺的规格要求
  34. MatNorm *MatNorm
  35. PlanCount float64 //生产数量
  36. FinalCount float64 //最终数量
  37. TotalPrice float64 //总价
  38. DeliveryTime time.Time //交货时间
  39. Price float64 //单价
  40. //供应商
  41. SupplierId primitive.ObjectID
  42. //计价
  43. PriceStrategy *PriceStrategy
  44. //单据Id
  45. BillId primitive.ObjectID
  46. }
  47. type MatNorm struct {
  48. PaperWidth string //下纸尺寸
  49. PaperHeight string //下纸尺寸
  50. }
  51. type CraftNorm struct {
  52. PrintWidth string //印刷尺寸
  53. PrintHeigt string //印刷尺寸
  54. }
  55. type ProcessNorm struct {
  56. Norm string
  57. }