1234567891011121314151617181920212223242526272829303132333435363738394041 |
- package comm
- import (
- "time"
- "go.mongodb.org/mongo-driver/bson/primitive"
- )
- type CategoryNode struct {
- Id string `bson:"id,omitempty" json:"id"`
- Type string `bson:"type,omitempty" json:"type"`
- Name string `bson:"name,omitempty" json:"name"`
- Value string `bson:"value,omitempty" json:"value"`
- IsEdit *bool `bson:"isEdit,omitempty" json:"isEdit"`
- Cover string `bson:"cover,omitempty" json:"cover"`
- Children []*CategoryNode `bson:"children,omitempty" json:"children"`
- }
- type DbCategory struct {
- Id primitive.ObjectID `bson:"_id,omitempty" json:"_id"`
- UserId primitive.ObjectID `bson:"userId,omitempty" json:"userId"`
- Scope string `bson:"scope,omitempty" json:"scope"`
- CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"`
- UpdateTime time.Time `bson:"updateTime,omitempty" json:"updateTime"`
- Categories []*CategoryNode `bson:"categories,omitempty" json:"categories" complex:"true"`
- }
- type DbAssetCategory struct {
- DbAssetId primitive.ObjectID `bson:"dbAssetConfId,omitempty" json:"dbAssetConfId"`
- CategoryIds []string `bson:"categoryIds,omitempty" json:"categoryIds"`
- }
- type DbAssetUserCategory struct {
- Id primitive.ObjectID `bson:"_id,omitempty" json:"_id"`
- UserId primitive.ObjectID `bson:"userId,omitempty" json:"userId"`
- Scope string `bson:"scope,omitempty" json:"scope"`
- CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"`
- UpdateTime time.Time `bson:"updateTime,omitempty" json:"updateTime"`
- CategoryConfs []*DbAssetCategory `bson:"categoryConfs,omitempty" json:"categoryConfs" complex:"true"`
- }
|