Functions into dbmodels, introduced air

This commit is contained in:
Simon Martens
2025-02-11 13:10:48 +01:00
parent ad91cbd4c6
commit 420fff6daa
16 changed files with 237 additions and 140 deletions

View File

@@ -25,7 +25,7 @@ func init() {
func agentsTable() *core.Collection {
collection := core.NewBaseCollection(dbmodels.AGENTS_TABLE)
setBasicPublicRules(collection)
dbmodels.SetBasicPublicRules(collection)
return collection
}
@@ -41,15 +41,15 @@ func agentsFields() core.FieldsList {
&core.TextField{Name: dbmodels.REFERENCES_FIELD, Required: false},
)
setMusenalmIDField(&fields)
setEditorStateField(&fields)
setNotesAndAnnotationsField(&fields)
dbmodels.SetMusenalmIDField(&fields)
dbmodels.SetEditorStateField(&fields)
dbmodels.SetNotesAndAnnotationsField(&fields)
return fields
}
func agentsIndexes(collection *core.Collection) {
addMusenalmIDIndex(collection)
addIndex(collection, dbmodels.AGENTS_NAME_FIELD, false)
addIndex(collection, dbmodels.URI_FIELD, false)
dbmodels.AddMusenalmIDIndex(collection)
dbmodels.AddIndex(collection, dbmodels.AGENTS_NAME_FIELD, false)
dbmodels.AddIndex(collection, dbmodels.URI_FIELD, false)
}