|
@@ -6,37 +6,15 @@ import (
|
|
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
|
|
)
|
|
|
|
|
|
-// 单位
|
|
|
-type Unit struct {
|
|
|
+// 材料只能添加,不能修改
|
|
|
+type Material struct {
|
|
|
Id primitive.ObjectID `bson:"_id,omitempty" json:"_id"`
|
|
|
Name string `bson:"name,omitempty" json:"name"`
|
|
|
+ Unit string `bson:"unit,omitempty" json:"unit"` // 单位
|
|
|
+ Price float64 `bson:"price,omitempty" json:"price"` // 单价
|
|
|
+ Norm string `bson:"norm,omitempty" json:"norm"` //规格
|
|
|
+ Category string `bson:"category,omitempty" json:"category"` //分类
|
|
|
+ Remark string `bson:"remark,omitempty" json:"remark"` // 备注
|
|
|
CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"`
|
|
|
-}
|
|
|
-
|
|
|
-// 分类
|
|
|
-type Category struct {
|
|
|
- Id primitive.ObjectID `bson:"_id,omitempty" json:"_id"`
|
|
|
- Name string `bson:"name,omitempty" json:"name"`
|
|
|
-
|
|
|
- //字母缩写
|
|
|
- LetterName string `bson:"letterName,omitempty" json:"letterName"`
|
|
|
- CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"`
|
|
|
-}
|
|
|
-
|
|
|
-// 材料只能添加,不能修改
|
|
|
-type Material struct {
|
|
|
- Id primitive.ObjectID `bson:"_id,omitempty" json:"_id"`
|
|
|
- Name string `bson:"name,omitempty" json:"name"`
|
|
|
- Category string `bson:"category,omitempty" json:"category"`
|
|
|
- Price float64 `bson:"price,omitempty" json:"price"`
|
|
|
- Unit string `bson:"unit,omitempty" json:"unit"`
|
|
|
-
|
|
|
- // 规格
|
|
|
- Norm string `bson:"norm,omitempty" json:"norm"`
|
|
|
- Heigth float64 `bson:"height,omitempty" json:"height"`
|
|
|
- Width float64 `bson:"width,omitempty" json:"width"`
|
|
|
- Remark string `bson:"remark,omitempty" json:"remark"`
|
|
|
-
|
|
|
- CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"`
|
|
|
- UpdateTime time.Time `bson:"updateTime,omitempty" json:"updateTime"`
|
|
|
+ UpdateTime time.Time `bson:"updateTime,omitempty" json:"updateTime"`
|
|
|
}
|