2026-03-18 10:18:03 +08:00
|
|
|
|
package entity
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
|
"assets/consts/public"
|
|
|
|
|
|
|
2026-06-10 15:40:17 +08:00
|
|
|
|
"gitea.redpowerfuture.com/red-future/common/beans"
|
2026-03-18 10:18:03 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// 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
|
|
|
|
|
|
}
|