Pages now work

Default Pages
Created & Updated Fields for every collection
This commit is contained in:
Simon Martens
2025-02-16 20:41:36 +01:00
parent 993e99f6dc
commit eb4bffdeec
37 changed files with 1276 additions and 10 deletions

View File

@@ -7,6 +7,11 @@ func SetBasicPublicRules(collection *core.Collection) {
collection.ListRule = PUBLIC_LIST_RULE
}
func SetCreatedUpdatedFields(fieldlist *core.FieldsList) {
fieldlist.Add(&core.AutodateField{Name: CREATED_FIELD, OnCreate: true})
fieldlist.Add(&core.AutodateField{Name: UPDATED_FIELD, OnCreate: true, OnUpdate: true})
}
func SetMusenalmIDField(fieldlist *core.FieldsList) {
fieldlist.Add(&core.TextField{Name: MUSENALMID_FIELD, Max: 64, Required: false})
}
@@ -70,6 +75,8 @@ func BasicRelationCollection(app core.App, sourcetablename, targettablename stri
&core.SelectField{Name: RELATION_TYPE_FIELD, Required: true, Values: relations, MaxSelect: 1},
&core.BoolField{Name: RELATION_CONJECTURE_FIELD, Required: false},
&core.BoolField{Name: RELATION_UNCERTAIN_FIELD, Required: false},
&core.AutodateField{Name: CREATED_FIELD, OnCreate: true},
&core.AutodateField{Name: UPDATED_FIELD, OnCreate: true, OnUpdate: true},
)
SetNotesAndAnnotationsField(&fields)