package model import ( "time" "go.mongodb.org/mongo-driver/bson/primitive" ) // 采购单 type PaperBill struct { //名字 Name string `bson:"name,omitempty" json:"name"` //规格 Norm string `bson:"norm,omitempty" json:"norm"` //宽 Width string `bson:"width,omitempty" json:"width"` //长 Height string `bson:"height,omitempty" json:"height"` Price float64 `bson:"price,omitempty" json:"price"` Price2 float64 `bson:"price2,omitempty" json:"price2"` PriceUnit string `bson:"priceUnit,omitempty" json:"priceUnit"` Price2Unit string `bson:"price2Unit,omitempty" json:"price2Unit"` //数量 // Count int `bson:"count,omitempty" json:"count"` // 下单数量 OrderCount int `bson:"orderCount,omitempty" json:"orderCount"` //备注 Remark string `bson:"remark,omitempty" json:"remark"` //交货时间 DeliveryTime time.Time `bson:"deliveryTime,omitempty" json:"deliveryTime"` } type PurchaseBill struct { Id primitive.ObjectID `bson:"_id,omitempty" json:"_id"` PackId primitive.ObjectID `bson:"packId,omitempty" json:"packId"` PlanId primitive.ObjectID `bson:"planId,omitempty" json:"planId"` SupplierId primitive.ObjectID `bson:"supplierId,omitempty" json:"supplierId"` UserId primitive.ObjectID `bson:"userId,omitempty" json:"userId"` UserName string `bson:"userName,omitempty" json:"userName"` //类别 Type string `bson:"type,omitempty" json:"type"` // 进行中 created 已完成 complete 已弃用 deprecated 已审核 reviewed Status string `bson:"status,omitempty" json:"status"` Reviewed int `bson:"reviewed,omitempty" json:"reviewed"` // -1 代表未审核 1已审核 SignUsers []primitive.ObjectID `bson:"signUsers,omitempty" json:"signUsers"` // 多个签名人 CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"` UpdateTime time.Time `bson:"updateTime,omitempty" json:"updateTime"` CompleteTime time.Time `bson:"completeTime,omitempty" json:"completeTime"` //供应商 Supplier string `bson:"supplier,omitempty" json:"supplier"` //送货地址 SendTo string `bson:"sendTo,omitempty" json:"sendTo"` //商品名字 ProductName string `bson:"productName,omitempty" json:"productName"` //纸张类采购 Paper []*PaperBill `bson:"papers,omitempty" json:"papers"` // 工序管理 Process *ProcessBill `bson:"process,omitempty" json:"process"` // 序号 SerialNumber string `bson:"serialNumber,omitempty" json:"serialNumber"` Remark string `bson:"remark,omitempty" json:"remark"` // 实际金额 RealAmount float64 `bson:"realAmount,omitempty" json:"realAmount"` // 预算金额 BudgetAmount float64 `bson:"budgetAmount,omitempty" json:"budgetAmount"` //确认收货数量 ConfirmCount int `bson:"confirmCount,omitempty" json:"confirmCount"` } // 工艺生产数据 type ProduceBillData struct { //名字 Name string `bson:"name,omitempty" json:"name"` //规格(质量要求) Norm string `bson:"norm,omitempty" json:"norm"` //单价 数量 Price float64 `bson:"price,omitempty" json:"price"` Price2 float64 `bson:"price2,omitempty" json:"price2"` // 成品数量 // Count int `bson:"count,omitempty" json:"count"` // 下单数量 OrderCount int `bson:"orderCount,omitempty" json:"orderCount"` //备注 Remark string `bson:"remark,omitempty" json:"remark"` //纸张 Paper string `bson:"paper,omitempty" json:"paper"` //来纸尺寸 PaperSize string `bson:"paperSize,omitempty" json:"paperSize"` //印刷尺寸 PrintSize string `bson:"printSize,omitempty" json:"printSize"` //交货时间 DeliveryTime time.Time `bson:"deliveryTime,omitempty" json:"deliveryTime"` // 确认收货数量 ConfirmCount int `bson:"confirmCount,omitempty" json:"confirmCount"` // 确认收货数量 BatchCount int `bson:"batchCount,omitempty" json:"batchCount"` // 工艺数量 CraftNum int `bson:"craftNum,omitempty" json:"craftNum"` } type ProduceBill struct { Id primitive.ObjectID `bson:"_id,omitempty" json:"_id"` PackId primitive.ObjectID `bson:"packId,omitempty" json:"packId"` PlanId primitive.ObjectID `bson:"planId,omitempty" json:"planId"` SupplierId primitive.ObjectID `bson:"supplierId,omitempty" json:"supplierId"` UserId primitive.ObjectID `bson:"userId,omitempty" json:"userId"` UserName string `bson:"userName,omitempty" json:"userName"` // 类别 Type string `bson:"type,omitempty" json:"type"` // 进行中 created 已完成 complete 已弃用 deprecated Status string `bson:"status,omitempty" json:"status"` Reviewed int `bson:"reviewed,omitempty" json:"reviewed"` // -1 代表未审核 1已审核 SignUsers []primitive.ObjectID `bson:"signUsers,omitempty" json:"signUsers"` // 多个签名人 CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"` UpdateTime time.Time `bson:"updateTime,omitempty" json:"updateTime"` CompleteTime time.Time `bson:"completeTime,omitempty" json:"completeTime"` //确认收货数量 ConfirmCount int `bson:"confirmCount,omitempty" json:"confirmCount"` // 实际金额 RealAmount float64 `bson:"realAmount,omitempty" json:"realAmount"` // 预算金额 BudgetAmount float64 `bson:"budgetAmount,omitempty" json:"budgetAmount"` //供应商 Supplier string `bson:"supplier,omitempty" json:"supplier"` //送货地址 SendTo string `bson:"sendTo,omitempty" json:"sendTo"` //商品名字 ProductName string `bson:"productName,omitempty" json:"productName"` //纸张类采购 Produces []*ProduceBillData `bson:"produces,omitempty" json:"produces"` // 序号 SerialNumber string `bson:"serialNumber,omitempty" json:"serialNumber"` }