Add page layout weight & reordering

This commit is contained in:
Tomaž Jerman
2023-04-07 12:39:26 +02:00
committed by Jože Fortun
parent 19133a4cb3
commit 0a2a11d9fd
79 changed files with 2143 additions and 482 deletions
+9 -22
View File
@@ -795,17 +795,6 @@ var PageLayout = &dal.Model{
Store: &dal.CodecAlias{Ident: "parent_id"},
},
&dal.Attribute{
Ident: "ModuleID",
Type: &dal.TypeRef{
RefAttribute: "id",
RefModel: &dal.ModelRef{
ResourceType: "corteza::compose:module",
},
},
Store: &dal.CodecAlias{Ident: "rel_module"},
},
&dal.Attribute{
Ident: "NamespaceID",
Type: &dal.TypeRef{
@@ -817,6 +806,15 @@ var PageLayout = &dal.Model{
Store: &dal.CodecAlias{Ident: "rel_namespace"},
},
&dal.Attribute{
Ident: "Weight", Sortable: true,
Type: &dal.TypeNumber{HasDefault: true,
DefaultValue: 0,
Precision: -1, Scale: -1, Meta: map[string]interface{}{"rdbms:type": "integer"},
},
Store: &dal.CodecAlias{Ident: "weight"},
},
&dal.Attribute{
Ident: "Meta",
Type: &dal.TypeJSON{
@@ -884,17 +882,6 @@ var PageLayout = &dal.Model{
},
Indexes: dal.IndexSet{
&dal.Index{
Ident: "compose_page_layout_module",
Type: "BTREE",
Fields: []*dal.IndexField{
{
AttributeIdent: "ModuleID",
},
},
},
&dal.Index{
Ident: "compose_page_layout_namespace",
Type: "BTREE",