26 lines
967 B
Go
26 lines
967 B
Go
package entity
|
||
|
||
import (
|
||
"assets/consts/public"
|
||
|
||
"gitea.com/red-future/common/beans"
|
||
)
|
||
|
||
// PrivateCategory 私域分类实体
|
||
type PrivateCategory struct {
|
||
beans.MongoBaseDO `bson:",inline"` // 嵌入基础字段:Id, Creator, CreatedAt, Updater, UpdatedAt, TenantId, IsDeleted
|
||
|
||
Name string `bson:"name" json:"name"` // 分类名称
|
||
ParentID string `bson:"parentId" json:"parentId"` // 父分类ID,为空表示根分类
|
||
Path string `bson:"path" json:"path"` // 分类路径,如:/root/parent
|
||
Level int `bson:"level" json:"level"` // 分类层级
|
||
IsLeafNode bool `bson:"isLeafNode" json:"isLeafNode"` // 是叶子节点
|
||
Sort int `bson:"sort" json:"sort"` // 排序
|
||
Image string `bson:"image" json:"image"` // 分类图片
|
||
}
|
||
|
||
// CollectionName 分类集合名称
|
||
func (PrivateCategory) CollectionName() string {
|
||
return public.PrivateCategoryCollection
|
||
}
|