refactor: 重构资产实体和DTO结构类型
将gjson.Json类型替换为具体的结构体和map类型,修正DAO层链式调用,启用SKU元数据校验逻辑
This commit is contained in:
@@ -35,15 +35,15 @@ var CategoryCol = categoryCol{
|
||||
// Category 分类实体
|
||||
type Category struct {
|
||||
beans.SQLBaseDO `orm:",inherit"`
|
||||
Name string `orm:"name" json:"name"` // 分类名称
|
||||
ParentId int64 `orm:"parent_id" json:"parentId"` // 父分类ID,为空表示根分类
|
||||
Path string `orm:"path" json:"path"` // 分类路径,如:/root/parent/child
|
||||
Level int `orm:"level" json:"level"` // 分类层级
|
||||
IsLeafNode *bool `orm:"is_leaf_node" json:"isLeafNode"` // 是叶子节点
|
||||
Sort int `orm:"sort" json:"sort"` // 排序
|
||||
Image string `orm:"image" json:"image"` // 分类图片
|
||||
Status consts.CategoryStatusType `orm:"status" json:"status"` // 状态:1启用/0禁用
|
||||
Attrs []CategoryAttr `orm:"attrs" json:"attrs,omitempty"` // 分类属性 CategoryAttr
|
||||
Name string `orm:"name" json:"name"` // 分类名称
|
||||
ParentId int64 `orm:"parent_id" json:"parentId"` // 父分类ID,为空表示根分类
|
||||
Path string `orm:"path" json:"path"` // 分类路径,如:/root/parent/child
|
||||
Level int `orm:"level" json:"level"` // 分类层级
|
||||
IsLeafNode *bool `orm:"is_leaf_node" json:"isLeafNode"` // 是叶子节点
|
||||
Sort int `orm:"sort" json:"sort"` // 排序
|
||||
Image string `orm:"image" json:"image"` // 分类图片
|
||||
Status consts.CategoryStatus `orm:"status" json:"status"` // 状态:1启用/0禁用
|
||||
Attrs []CategoryAttr `orm:"attrs" json:"attrs,omitempty"` // 分类属性 CategoryAttr
|
||||
// 使用场景说明:
|
||||
// 1. 商品分类属性:为该分类下的商品定义标准化的属性模板,如服装分类可定义尺寸、颜色、材质等属性
|
||||
// 2. 服务分类属性:为服务类目定义特性参数,如咨询服务可定义服务时长、服务方式、专业领域等
|
||||
|
||||
Reference in New Issue
Block a user