mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-09 08:44:20 +01:00
🎨 The database date field supports filling the current time by default https://github.com/siyuan-note/siyuan/issues/10823
This commit is contained in:
parent
9bdf885763
commit
66e2b0eaa7
3 changed files with 62 additions and 11 deletions
|
|
@ -91,20 +91,23 @@ type Key struct {
|
|||
|
||||
// 以下是某些列类型的特有属性
|
||||
|
||||
// 单选/多选列
|
||||
// 单选/多选
|
||||
Options []*SelectOption `json:"options,omitempty"` // 选项列表
|
||||
|
||||
// 数字列
|
||||
// 数字
|
||||
NumberFormat NumberFormat `json:"numberFormat"` // 列数字格式化
|
||||
|
||||
// 模板列
|
||||
// 模板
|
||||
Template string `json:"template"` // 模板内容
|
||||
|
||||
// 关联列
|
||||
// 关联
|
||||
Relation *Relation `json:"relation,omitempty"` // 关联信息
|
||||
|
||||
// 汇总列
|
||||
// 汇总
|
||||
Rollup *Rollup `json:"rollup,omitempty"` // 汇总信息
|
||||
|
||||
// 日期
|
||||
Date *Date `json:"date,omitempty"` // 日期设置
|
||||
}
|
||||
|
||||
func NewKey(id, name, icon string, keyType KeyType) *Key {
|
||||
|
|
@ -116,6 +119,10 @@ func NewKey(id, name, icon string, keyType KeyType) *Key {
|
|||
}
|
||||
}
|
||||
|
||||
type Date struct {
|
||||
AutoFillNow bool `json:"autoFillNow"` // 是否自动填充当前时间 The database date field supports filling the current time by default https://github.com/siyuan-note/siyuan/issues/10823
|
||||
}
|
||||
|
||||
type Rollup struct {
|
||||
RelationKeyID string `json:"relationKeyID"` // 关联列 ID
|
||||
KeyID string `json:"keyID"` // 目标列 ID
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue