1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- package model
- import (
- "time"
- "go.mongodb.org/mongo-driver/bson/primitive"
- )
- // 生产计划
- type ProductPlan struct {
- Id primitive.ObjectID `bson:"_id,omitempty" json:"_id"`
- Name string `bson:"name,omitempty" json:"name"`
- // 包装 待生产的产品
- Pack *Pack `bson:"pack,omitempty" json:"pack"`
- Thumbnail string `bson:"thumbnail,omitempty" json:"thumbnail"`
- CreateUser string `bson:"createUser,omitempty" json:"createUser"`
- //生产数量
- Total int `bson:"total,omitempty" json:"total"`
- //状态
- Status string `bson:"status,omitempty" json:"status"`
- //总价
- TotalPrice float64 `bson:"totalPrice,omitempty" json:"totalPrice"`
- //所有包装部件的工序
- Components []*PackComp `bson:"components,omitempty" json:"components"`
- UpdateTime time.Time `bson:"updteTime,omitempty" json:"updateTime"`
- CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"`
- }
- type PackComp struct {
- //包装部件Id
- Id primitive.ObjectID `bson:"id,omitempty" json:"id"`
- Steps []*ProductUnit `bson:"steps,omitempty" json:"steps"`
- //生产的工序列表
- }
- // 工序单位
- type ProductUnit struct {
- //工序Id
- Id string `bson:"id,omitempty" json:"id"`
- //mat craft process
- Type string `bson:"type,omitempty" json:"type"`
- //type类型对应的Id
- TypeId string `bson:"typeId,omitempty" json:"typeId"`
- //生产工艺的规格要求
- CraftNorm *CraftNorm `bson:"craftNorm,omitempty" json:"craftNorm"`
- MatNorm *MatNorm `bson:"matNorm,omitempty" json:"matNorm"`
- //生产数量
- PlanCount float64 `bson:"planCount,omitempty" json:"planCount"`
- //最终数量
- FinalCount float64 `bson:"finalCount,omitempty" json:"finalCount"`
- //总价 需要计算
- TotalPrice float64 `bson:"totalPrice,omitempty" json:"totalPrice"`
- //交货时间 需要处理
- DeliveryTime time.Time `bson:"deliveryTime,omitempty" json:"deliveryTime"`
- //单价
- Price float64 `bson:"price,omitempty" json:"price"`
- //供应商
- SupplierId primitive.ObjectID `bson:"supplierId,omitempty" json:"supplierId"`
- //计价
- PriceStrategy *PriceStrategy `bson:"priceStrategy,omitempty" json:"priceStrategy"`
- //单据Id
- BillId primitive.ObjectID `bson:"billId,omitempty" json:"billId"`
- }
- type MatNorm struct {
- //下纸尺寸
- PaperWidth string `bson:"paperWidth,omitempty" json:"paperWidth"`
- PaperHeight string `bson:"paperHeight,omitempty" json:"paperHeight"`
- }
- type CraftNorm struct {
- //印刷尺寸
- PrintWidth string `bson:"printWidth,omitempty" json:"printWidth"`
- PrintHeight string `bson:"printHeight,omitempty" json:"printHeight"`
- }
- type ProcessNorm struct {
- Norm string `bson:"norm,omitempty" json:"norm"`
- }
|