🎨 基于内容块属性动态建立对应数据库表结构 https://github.com/siyuan-note/siyuan/issues/7521
This commit is contained in:
parent
aa664856cc
commit
7dcef7b84b
4 changed files with 30 additions and 6 deletions
|
@ -14,7 +14,7 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
// Package av 是属性视图相关的实现。
|
||||
// Package av 包含了属性视图(Attribute View)相关的实现。
|
||||
package av
|
||||
|
||||
import (
|
|
@ -47,3 +47,10 @@ func (c *BaseColumn) Name() string {
|
|||
func (c *BaseColumn) Type() string {
|
||||
return c.BaseType
|
||||
}
|
||||
|
||||
// ColumnValueResolver 描述了属性视图的列值解析器。
|
||||
type ColumnValueResolver interface {
|
||||
|
||||
// Resolve 用于解析列值。
|
||||
Resolve() string
|
||||
}
|
||||
|
|
|
@ -20,8 +20,3 @@ type ColumnRelation struct {
|
|||
*BaseColumn
|
||||
AttributeViewID string `json:"attributeViewId"` // 关联的属性视图 ID
|
||||
}
|
||||
|
||||
type AttributeViewColumnRollup struct {
|
||||
*BaseColumn
|
||||
RelationID string `json:"relationId"` // 目标关联列 ID
|
||||
}
|
||||
|
|
22
kernel/av/column_rollup.go
Normal file
22
kernel/av/column_rollup.go
Normal file
|
@ -0,0 +1,22 @@
|
|||
// SiYuan - Build Your Eternal Digital Garden
|
||||
// Copyright (c) 2020-present, b3log.org
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
package av
|
||||
|
||||
type ColumnRollup struct {
|
||||
*BaseColumn
|
||||
RelationColumnID string `json:"relationColumnId"` // 目标关联列 ID
|
||||
}
|
Loading…
Add table
Reference in a new issue