mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Add Include time switch to database creation time field and update time field https://github.com/siyuan-note/siyuan/issues/12091
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
75da247b23
commit
0bea01ad3b
8 changed files with 262 additions and 37 deletions
|
|
@ -146,6 +146,12 @@ type Key struct {
|
|||
|
||||
// 日期
|
||||
Date *Date `json:"date,omitempty"` // 日期设置
|
||||
|
||||
// 创建时间
|
||||
Created *Created `json:"created,omitempty"` // 创建时间设置
|
||||
|
||||
// 更新时间
|
||||
Updated *Updated `json:"updated,omitempty"` // 更新时间设置
|
||||
}
|
||||
|
||||
func NewKey(id, name, icon string, keyType KeyType) *Key {
|
||||
|
|
@ -167,6 +173,14 @@ func (k *Key) GetOption(name string) (ret *SelectOption) {
|
|||
return
|
||||
}
|
||||
|
||||
type Created struct {
|
||||
IncludeTime bool `json:"includeTime"` // 是否填充具体时间 Add `Include time` switch to database creation time field and update time field https://github.com/siyuan-note/siyuan/issues/12091
|
||||
}
|
||||
|
||||
type Updated struct {
|
||||
IncludeTime bool `json:"includeTime"` // 是否填充具体时间 Add `Include time` switch to database creation time field and update time field https://github.com/siyuan-note/siyuan/issues/12091
|
||||
}
|
||||
|
||||
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
|
||||
FillSpecificTime bool `json:"fillSpecificTime"` // 是否填充具体时间 Add `Default fill specific time` switch to database date field https://github.com/siyuan-note/siyuan/issues/12089
|
||||
|
|
@ -396,7 +410,7 @@ type Viewable interface {
|
|||
func NewAttributeView(id string) (ret *AttributeView) {
|
||||
view, blockKey, selectKey := NewTableViewWithBlockKey(ast.NewNodeID())
|
||||
ret = &AttributeView{
|
||||
Spec: 3,
|
||||
Spec: CurrentSpec,
|
||||
ID: id,
|
||||
KeyValues: []*KeyValues{{Key: blockKey}, {Key: selectKey}},
|
||||
ViewID: view.ID,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue