54 lines
1.4 KiB
YAML
54 lines
1.4 KiB
YAML
import:
|
|
- github.com/cortezaproject/corteza-server/compose/types
|
|
|
|
types:
|
|
type: types.Page
|
|
|
|
fields:
|
|
- { field: ID }
|
|
- { field: SelfID }
|
|
- { field: NamespaceID }
|
|
- { field: ModuleID }
|
|
- { field: Handle, lookupFilterPreprocessor: lower }
|
|
- { field: Title }
|
|
- { field: Description, type: "string" }
|
|
- { field: Blocks, type: "types.PageBlocks" }
|
|
- { field: Visible, type: bool }
|
|
- { field: Weight, type: int, sortable: true }
|
|
- { field: CreatedAt, sortable: true }
|
|
- { field: UpdatedAt, sortable: true }
|
|
- { field: DeletedAt, sortable: true }
|
|
|
|
lookups:
|
|
- fields: [ NamespaceID, Handle ]
|
|
filter: { DeletedAt: nil }
|
|
description: |-
|
|
searches for page by handle (case-insensitive)
|
|
|
|
- fields: [ NamespaceID, ModuleID ]
|
|
filter: { DeletedAt: nil }
|
|
description: |-
|
|
searches for page by moduleID
|
|
|
|
- fields: [ ID ]
|
|
description: |-
|
|
searches for compose page by ID
|
|
|
|
It returns compose page even if deleted
|
|
|
|
functions:
|
|
- name: ReorderComposePages
|
|
arguments:
|
|
- { name: namespaceID, type: "uint64" }
|
|
- { name: parentID, type: "uint64" }
|
|
- { name: pageIDs, type: "[]uint64" }
|
|
return: [ "error" ]
|
|
|
|
rdbms:
|
|
alias: cpg
|
|
table: compose_page
|
|
customFilterConverter: true
|
|
mapFields:
|
|
SelfID: { column: self_id }
|
|
|