123456789101112131415161718192021222324252627282930313233343536 |
- package model
- import (
- "time"
- "go.mongodb.org/mongo-driver/bson/primitive"
- "infish.cn/comm"
- )
- type DbAsset struct {
- Id string `bson:"id,omitempty" json:"id"` //资产id
- UserId string `bson:"userId,omitempty" json:"userId"`
- Label string `bson:"label,omitempty" json:"label"`
- Type int `bson:"type,omitempty" json:"type"` //AssetTypeMesh AssetTypeImage ...
- Collection string `bson:"collection,omitempty" json:"collection"` //数据库存储集合
- CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"`
- CategoryIds []string `bson:"categoryIds,omitempty" json:"categoryIds"`
- }
- type AssetDbConf struct {
- Db *Database
- AssetConf *DbAsset
- }
- type Database struct {
- Id primitive.ObjectID `bson:"_id,omitempty" json:"_id"` //数据库Id
- UserId string `bson:"userId,omitempty" json:"userId"` //数据库Id
- Name string `bson:"name,omitempty" json:"name"` //数据库名字
- Label string `bson:"label,omitempty" json:"label"` //前端展示标签
- CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"`
- Categories *comm.DbCategory `bson:"categories,omitempty" json:"categories"` //数据的分类
- Assets []*DbAsset `bson:"assets,omitempty" json:"assets"` //资产定义
- }
|