package model import ( "time" "go.mongodb.org/mongo-driver/bson/primitive" ) type ProductTplComponent struct { Name string `bson:"name,omitempty" json:"name"` CreateType uint8 `bson:"createType,omitempty" json:"createType"` //0-模型创建 1-dynamic 动态生成 Label string `bson:"label,omitempty" json:"label"` //ui 显示的名字 UV *struct { Width uint `bson:"width,omitempty" json:"width"` Height uint `bson:"height,omitempty" json:"height"` Image OssType `bson:"image,omitempty" json:"image"` } `bson:"uv,omitempty" json:"uv"` } type ProductTpl struct { Id primitive.ObjectID `bson:"_id,omitempty" json:"_id"` CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"` MeshId primitive.ObjectID `bson:"meshId,omitempty" json:"meshId"` Name string `bson:"name,omitempty" json:"name"` Thumbnail *OssType `bson:"thumbnail,omitempty" json:"thumbnail"` Components []*ProductTplComponent `bson:"components,omitempty" json:"components"` //模板部件 IsPublic *bool `bson:"isPublic,omitempty" json:"isPublic"` //是否公开 }