mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
♻️ Refactor av
This commit is contained in:
parent
67b8566047
commit
28095c5ef7
6 changed files with 112 additions and 87 deletions
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
package av
|
||||
|
||||
// BaseLayout 描述了布局的基础结构,包含通用的过滤、排序和分页信息。
|
||||
// BaseLayout 描述了布局的基础结构。
|
||||
type BaseLayout struct {
|
||||
Spec int `json:"spec"` // 布局格式版本
|
||||
ID string `json:"id"` // 布局 ID
|
||||
|
|
@ -24,3 +24,32 @@ type BaseLayout struct {
|
|||
Sorts []*ViewSort `json:"sorts"` // 排序规则
|
||||
PageSize int `json:"pageSize"` // 每页行数
|
||||
}
|
||||
|
||||
// BaseValue 描述了字段值的基础结构。
|
||||
type BaseValue struct {
|
||||
ID string `json:"id"` // 字段值 ID
|
||||
Value *Value `json:"value"` // 字段值
|
||||
ValueType KeyType `json:"valueType"` // 字段值类型
|
||||
}
|
||||
|
||||
// BaseInstance 描述了实例的基础结构。
|
||||
type BaseInstance struct {
|
||||
ID string `json:"id"` // ID
|
||||
Icon string `json:"icon"` // 图标
|
||||
Name string `json:"name"` // 名称
|
||||
Desc string `json:"desc"` // 描述
|
||||
HideAttrViewName bool `json:"hideAttrViewName"` // 是否隐藏属性视图名称
|
||||
Filters []*ViewFilter `json:"filters"` // 过滤规则
|
||||
Sorts []*ViewSort `json:"sorts"` // 排序规则
|
||||
PageSize int `json:"pageSize"` // 每页项目
|
||||
}
|
||||
|
||||
// BaseInstanceField 描述了实例字段的基础结构。
|
||||
type BaseInstanceField struct {
|
||||
ID string `json:"id"` // ID
|
||||
Name string `json:"name"` // 字段名
|
||||
Type KeyType `json:"type"` // 字段类型
|
||||
Icon string `json:"icon"` // 字段图标
|
||||
Hidden bool `json:"hidden"` // 是否隐藏
|
||||
Desc string `json:"desc"` // 字段描述
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue