3
0

Restructured CUE resource definitions (struct, attributes)

This commit is contained in:
Denis Arh
2022-08-17 14:34:49 +02:00
parent 4f26fc5f6b
commit ccfb4c09bb
44 changed files with 2606 additions and 635 deletions

View File

@@ -24,22 +24,20 @@ resources: {
features: _allFeaturesDisabled
model: {
role_id: { primaryKey: true, goType: "uint64", ident: "roleID", storeIdent: "rel_role" }
resource: { primaryKey: true }
operation: { primaryKey: true }
access: { goType: "types.Access" }
ident: "rbac_rules"
attributes: {
role_id: { primaryKey: true, goType: "uint64", ident: "roleID", storeIdent: "rel_role" }
resource: { primaryKey: true }
operation: { primaryKey: true }
access: { goType: "types.Access" }
}
}
store: {
ident: "rbacRule"
settings: {
rdbms: {
table: "rbac_rules"
}
}
api: {
functions: [
{
@@ -68,15 +66,17 @@ resources: {
features: _allFeaturesDisabled
model: {
kind: { primaryKey: true }
resource_id: { primaryKey: true, goType: "uint64", ident: "resourceID", storeIdent: "rel_resource" }
name: { primaryKey: true, ignoreCase: true }
value: {}
attributes: {
kind: { primaryKey: true }
resource_id: { primaryKey: true, goType: "uint64", ident: "resourceID", storeIdent: "rel_resource" }
name: { primaryKey: true, ignoreCase: true }
value: {}
}
}
filter: {
expIdent: "LabelFilter"
model: {
struct: {
kind: {}
rel_resource: { goType: "[]uint64", ident: "resourceID" }
limit: { goType: "uint" }
@@ -124,16 +124,18 @@ resources: {
features: _allFeaturesDisabled
model: {
kind: { primaryKey: true }
resource_id: { primaryKey: true, goType: "uint64", ident: "resourceID", storeIdent: "rel_resource" }
owned_by: { primaryKey: true, goType: "uint64" }
name: { primaryKey: true, ignoreCase: true }
active: { goType: "bool"}
attributes: {
kind: { primaryKey: true }
resource_id: { primaryKey: true, goType: "uint64", ident: "resourceID", storeIdent: "rel_resource" }
owned_by: { primaryKey: true, goType: "uint64" }
name: { primaryKey: true, ignoreCase: true }
active: { goType: "bool"}
}
}
filter: {
expIdent: "FlagFilter"
model: {
struct: {
kind: {}
resource_id: { goType: "[]uint64", ident: "resourceID", storeIdent: "rel_resource" }
owned_by: { goType: "[]uint64", ident: "ownedBy" }
@@ -174,23 +176,26 @@ resources: {
}
model: {
id: schema.IdField
timestamp: schema.SortableTimestampField & { storeIdent: "ts" }
request_origin: {}
request_id: { ident: "requestID" }
actor_ip_addr: { ident: "actorIPAddr"}
actor_id: { goType: "uint64", ident: "actorID" }
resource: {}
action: {}
error: {}
severity: { goType: "types.Severity" }
description: {}
meta: { goType: "types.Meta" }
ident: "actionlog"
attributes: {
id: schema.IdField
timestamp: schema.SortableTimestampField & { storeIdent: "ts" }
request_origin: {}
request_id: { ident: "requestID" }
actor_ip_addr: { ident: "actorIPAddr"}
actor_id: { goType: "uint64", ident: "actorID" }
resource: {}
action: {}
error: {}
severity: { goType: "types.Severity" }
description: {}
meta: { goType: "types.Meta" }
}
}
filter: {
expIdent: "Filter"
model: {
struct: {
from_timestamp: { goType: "*time.Time" }
to_timestamp: { goType: "*time.Time" }
before_action_id: { goType: "uint64", ident: "beforeActionID" }
@@ -207,13 +212,6 @@ resources: {
store: {
ident: "actionlog"
settings: {
rdbms: {
table: "actionlog"
}
}
api: {
lookups: [
{
@@ -241,17 +239,20 @@ resources: {
features: _allFeaturesDisabled
model: {
id: schema.IdField
timestamp: schema.SortableTimestampField & { storeIdent: "ts" }
resource_type: {}
resource_action: {}
resource_id: { goType: "uint64", ident: "resourceID", storeIdent: "rel_resource" }
meta: { goType: "rawJson" }
ident: "resource_activity_log"
attributes: {
id: schema.IdField
timestamp: schema.SortableTimestampField & { storeIdent: "ts" }
resource_type: {}
resource_action: {}
resource_id: { goType: "uint64", ident: "resourceID", storeIdent: "rel_resource" }
meta: { goType: "rawJson" }
}
}
filter: {
expIdent: "ResourceActivityFilter"
model: {
struct: {
from_timestamp: { goType: "*time.Time" }
to_timestamp: { goType: "*time.Time" }
}
@@ -260,12 +261,6 @@ resources: {
store: {
ident: "resourceActivity"
settings: {
rdbms: {
table: "resource_activity_log"
}
}
api: {
lookups: []
}

View File

@@ -10,25 +10,28 @@ session: {
}
model: {
id: schema.IdField
workflow_id: { sortable: true, ident: "workflowID", goType: "uint64", storeIdent: "rel_workflow" }
event_type: { sortable: true, goType: "string" }
resource_type: { sortable: true, goType: "string" }
status: { sortable: true, goType: "types.SessionStatus" }
input: { goType: "*expr.Vars" }
output: { goType: "*expr.Vars" }
stacktrace: { goType: "types.Stacktrace" }
ident: "automation_sessions"
attributes: {
id: schema.IdField
workflow_id: { sortable: true, ident: "workflowID", goType: "uint64", storeIdent: "rel_workflow" }
event_type: { sortable: true, goType: "string" }
resource_type: { sortable: true, goType: "string" }
status: { sortable: true, goType: "types.SessionStatus" }
input: { goType: "*expr.Vars" }
output: { goType: "*expr.Vars" }
stacktrace: { goType: "types.Stacktrace" }
created_by: { goType: "uint64" }
created_at: schema.SortableTimestampField
purge_at: schema.SortableTimestampNilField
completed_at: schema.SortableTimestampNilField
suspended_at: schema.SortableTimestampNilField
error: {}
created_by: { goType: "uint64" }
created_at: schema.SortableTimestampField
purge_at: schema.SortableTimestampNilField
completed_at: schema.SortableTimestampNilField
suspended_at: schema.SortableTimestampNilField
error: {}
}
}
filter: {
model: {
struct: {
session_id: { goType: "[]uint64", storeIdent: "id", ident: "sessionID" }
completed: { schema.SortableTimestampNilField, storeIdent: "completed_at" }
created_by: { goType: "[]uint64" }
@@ -45,12 +48,6 @@ session: {
store: {
ident: "automationSession"
settings: {
rdbms: {
table: "automation_sessions"
}
}
api: {
lookups: [
{

View File

@@ -6,27 +6,30 @@ import (
trigger: {
model: {
id: schema.IdField
workflow_id: { sortable: true, ident: "workflowID", goType: "uint64", storeIdent: "rel_workflow" }
step_id: { ident: "stepID", goType: "uint64", storeIdent: "rel_step" }
enabled: { sortable: true, goType: "bool" }
resource_type: { sortable: true, goType: "string" }
event_type: { sortable: true, goType: "string" }
meta: { goType: "*types.TriggerMeta" }
constraints: { goType: "types.TriggerConstraintSet" }
input: { goType: "*expr.Vars" }
ident: "automation_triggers"
attributes: {
id: schema.IdField
workflow_id: { sortable: true, ident: "workflowID", goType: "uint64", storeIdent: "rel_workflow" }
step_id: { ident: "stepID", goType: "uint64", storeIdent: "rel_step" }
enabled: { sortable: true, goType: "bool" }
resource_type: { sortable: true, goType: "string" }
event_type: { sortable: true, goType: "string" }
meta: { goType: "*types.TriggerMeta" }
constraints: { goType: "types.TriggerConstraintSet" }
input: { goType: "*expr.Vars" }
owned_by: { goType: "uint64" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
owned_by: { goType: "uint64" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
}
}
filter: {
model: {
struct: {
deleted: { goType: "filter.State", storeIdent: "deleted_at" }
disabled: { goType: "filter.State", storeIdent: "enabled" }
trigger_id: { goType: "[]uint64", ident: "triggerID", storeIdent: "id" }
@@ -43,11 +46,6 @@ trigger: {
store: {
ident: "automationTrigger"
settings: {
rdbms: {
table: "automation_triggers"
}
}
api: {
lookups: [
{

View File

@@ -6,29 +6,32 @@ import (
workflow: {
model: {
id: schema.IdField
handle: schema.HandleField
meta: { goType: "*types.WorkflowMeta" }
enabled: { sortable: true, goType: "bool" }
trace: { goType: "bool" }
keep_sessions: { goType: "int" }
scope: { goType: "*expr.Vars" }
steps: { goType: "types.WorkflowStepSet" }
paths: { goType: "types.WorkflowPathSet" }
issues: { goType: "types.WorkflowIssueSet" }
run_as: { goType: "uint64" }
ident: "automation_workflows"
attributes: {
id: schema.IdField
handle: schema.HandleField
meta: { goType: "*types.WorkflowMeta" }
enabled: { sortable: true, goType: "bool" }
trace: { goType: "bool" }
keep_sessions: { goType: "int" }
scope: { goType: "*expr.Vars" }
steps: { goType: "types.WorkflowStepSet" }
paths: { goType: "types.WorkflowPathSet" }
issues: { goType: "types.WorkflowIssueSet" }
run_as: { goType: "uint64" }
owned_by: { goType: "uint64" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
owned_by: { goType: "uint64" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
}
}
filter: {
model: {
struct: {
deleted: { goType: "filter.State", storeIdent: "deleted_at" }
disabled: { goType: "filter.State", storeIdent: "enabled" }
}
@@ -53,12 +56,6 @@ workflow: {
store: {
ident: "automationWorkflow"
settings: {
rdbms: {
table: "automation_workflows"
}
}
api: {
lookups: [
{

View File

@@ -14,7 +14,7 @@ var (
// {{ .ident }}Table represents {{ .identPlural }} store table
//
// This value is auto-generated
{{ .ident }}Table = goqu.T({{ printf "%q" .settings.rdbms.table }})
{{ .ident }}Table = goqu.T({{ printf "%q" .modelIdent }})
// {{ .ident }}SelectQuery assembles select query for fetching {{ .identPlural }}
//

View File

@@ -5,8 +5,10 @@ import (
)
#Model: {
// Each field can be
[name=_]: {"name": name} & #ModelAttribute
ident: string
attributes: {
[name=_]: {"name": name} & #ModelAttribute
}
}
// logic in struct fields is a bit different
@@ -38,7 +40,7 @@ import (
#ModelAttributeJsonTag
}
IdField: #ModelAttribute & {
IdField: {
// Expecting ID field to always have name ID
name: "id"
expIdent: "ID"
@@ -49,7 +51,7 @@ IdField: #ModelAttribute & {
goType: "uint64"
}
HandleField: #ModelAttribute & {
HandleField: {
// Expecting ID field to always have name handle
name: "handle"
unique: true
@@ -58,12 +60,12 @@ HandleField: #ModelAttribute & {
goType: "string"
}
SortableTimestampField: #ModelAttribute & {
SortableTimestampField: {
sortable: true
goType: "time.Time"
}
SortableTimestampNilField: #ModelAttribute & {
SortableTimestampNilField: {
sortable: true
goType: "*time.Time"
}

View File

@@ -18,11 +18,18 @@ import (
// Fully qualified resource name
fqrn: string | *(platform + "::" + component + ":" + handle)
model: #Model
model: #Model & {
// use resource handle (plural) as model ident as default
// model ident represents a db table or a container name
ident: string | *"\(strings.Replace(handle, "-", "_", -1))s"
}
filter: {
"expIdent": #expIdent | *"\(expIdent)Filter"
model: #Model
struct: {
[name=_]: {"name": name} & #ModelAttribute
}
// generate filtering by-nil-state for the specified fields
"byNilState": [...string]
@@ -86,7 +93,7 @@ import (
api?: {
lookups: [...{
_expFields: [ for f in fields {strings.ToTitle(model[f].expIdent)}]
_expFields: [ for f in fields {strings.ToTitle(model.attributes[f].expIdent)}]
"expIdent": "Lookup\(store.expIdent)By" + strings.Join(_expFields, "")
description: string | *""
@@ -108,15 +115,6 @@ import (
return: [...string]
}]
}
settings: {
defaultOrder: [...{ field: string, descending: bool | *false }]
rdbms: {
// use resource handle (plural) as RDBMS table name as default
table: string | *"\(strings.Replace(handle, "-", "_", -1))s"
}
}
}
}

View File

@@ -16,11 +16,13 @@ _StoreResource: {
identPlural: res.store.identPlural
expIdent: res.store.expIdent
expIdentPlural: res.store.expIdentPlural
modelIdent: res.model.ident
goType: "\(typePkg).\(res.expIdent)"
goSetType: "\(typePkg).\(res.expIdent)Set"
goFilterType: "\(typePkg).\(res.filter.expIdent)"
struct: [ for f in res.model if f.store {
struct: [ for f in res.model.attributes if f.store {
"ident": f.ident
"expIdent": f.expIdent
"storeIdent": f.storeIdent
@@ -32,17 +34,17 @@ _StoreResource: {
filter: {
// query fields as defined in struct
"query": [ for name in res.filter.query {res.model[name]}],
"query": [ for name in res.filter.query {res.model.attributes[name]}],
// filter by nil state as defined in filter
"byNilState": [ for name in res.filter.byNilState {res.filter.model[name]}]
"byNilState": [ for name in res.filter.byNilState {res.filter.struct[name]}]
// filter by false as defined in filter
"byFalseState": [ for name in res.filter.byFalseState {res.filter.model[name]}]
"byFalseState": [ for name in res.filter.byFalseState {res.filter.struct[name]}]
// filter by value as defined in filter
// @todo this should be pulled from the struct
"byValue": [ for name in res.filter.byValue {res.filter.model[name]}]
"byValue": [ for name in res.filter.byValue {res.filter.struct[name]}]
"byLabel": res.features.labels
"byFlag": res.features.flags
}
@@ -67,7 +69,7 @@ _StoreResource: {
}
deleteByPK: {
primaryKeys: [ for f in res.model if f.primaryKey {f} ]
primaryKeys: [ for f in res.model.attributes if f.primaryKey {f} ]
_pkExpNames: strings.Join([ for f in primaryKeys { f.expIdent } ], "")
"expFnIdent": "Delete\(res.store.expIdent)By\(_pkExpNames)"
}
@@ -85,7 +87,7 @@ _StoreResource: {
// Copy all relevant fields from the struct
"args": [
for name in l.fields {
let f = res.model[name]
let f = res.model.attributes[name]
"ident": f.ident
"storeIdent": f.storeIdent
@@ -126,7 +128,7 @@ _StoreResource: {
"fnIdent": "sortable\(expIdent)Fields"
fields: {
for f in res.model if f.sortable || f.unique || f.primaryKey {
for f in res.model.attributes if f.sortable || f.unique || f.primaryKey {
{
"\(strings.ToLower(f.name))": f.name
"\(strings.ToLower(f.ident))": f.name
@@ -140,8 +142,8 @@ _StoreResource: {
"fnIdent": "collect\(expIdent)CursorValues"
fields: [ for f in res.model if f.sortable || f.unique || f.primaryKey {f} ]
primaryKeys: [ for f in res.model if f.primaryKey {f} ]
fields: [ for f in res.model.attributes if f.sortable || f.unique || f.primaryKey {f} ]
primaryKeys: [ for f in res.model.attributes if f.primaryKey {f} ]
}
checkConstraints: {
@@ -152,9 +154,9 @@ _StoreResource: {
checks: [
for lookup in res.store.api.lookups if lookup.constraintCheck {
lookupFnIdent: lookup.expIdent
fields: [ for name in lookup.fields {res.model[name]}]
fields: [ for name in lookup.fields {res.model.attributes[name]}]
nullConstraint: [
for f in res.model if list.Contains(lookup.nullConstraint, f.name) {
for f in res.model.attributes if list.Contains(lookup.nullConstraint, f.name) {
"expIdent": f.expIdent
},
]
@@ -163,8 +165,6 @@ _StoreResource: {
}
}
}
settings: res.store.settings
}
}

View File

@@ -10,21 +10,24 @@ attachment: {
}
model: {
id: schema.IdField
owner_id: { sortable: true, goType: "uint64", storeIdent: "rel_owner", ident: "ownerID" }
namespace_id: { sortable: true, goType: "uint64", storeIdent: "rel_namespace", ident: "namespaceID" }
kind: {sortable: true}
url: {}
preview_url: {}
name: {sortable: true}
meta: { goType: "types.AttachmentMeta" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
ident: "compose_attachment"
attributes: {
id: schema.IdField
owner_id: { sortable: true, goType: "uint64", storeIdent: "rel_owner", ident: "ownerID" }
namespace_id: { sortable: true, goType: "uint64", storeIdent: "rel_namespace", ident: "namespaceID" }
kind: {sortable: true}
url: {}
preview_url: {}
name: {sortable: true}
meta: { goType: "types.AttachmentMeta" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
}
}
filter: {
model: {
struct: {
kind: {}
namespace_id: { goType: "uint64", ident: "namespaceID" }
page_id: { goType: "uint64", ident: "pageID" }
@@ -39,12 +42,7 @@ attachment: {
store: {
ident: "composeAttachment"
settings: {
rdbms: {
table: "compose_attachment"
}
}
api: {
api: {
lookups: [
{ fields: ["id"] },
]

View File

@@ -10,24 +10,27 @@ chart: {
]
model: {
id: schema.IdField
handle: schema.HandleField
name: {sortable: true}
config: { goType: "types.ChartConfig" }
namespace_id: { sortable: true, ident: "namespaceID", goType: "uint64", storeIdent: "rel_namespace" }
ident: "compose_chart"
attributes: {
id: schema.IdField
handle: schema.HandleField
name: {sortable: true}
config: { goType: "types.ChartConfig" }
namespace_id: { sortable: true, ident: "namespaceID", goType: "uint64", storeIdent: "rel_namespace" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
}
}
filter: {
model: {
chart_id: { goType: "[]uint64", ident: "chartID", storeIdent: "id" }
namespace_id: { goType: "uint64", ident: "namespaceID", storeIdent: "rel_namespace" }
handle: { goType: "string" }
name: { goType: "string" }
deleted: { goType: "filter.State", storeIdent: "deleted_at" }
struct: {
chart_id: { goType: "[]uint64", ident: "chartID", storeIdent: "id" }
namespace_id: { goType: "uint64", ident: "namespaceID", storeIdent: "rel_namespace" }
handle: { goType: "string" }
name: { goType: "string" }
deleted: { goType: "filter.State", storeIdent: "deleted_at" }
}
query: ["handle", "name"]
@@ -65,12 +68,6 @@ chart: {
store: {
ident: "composeChart"
settings: {
rdbms: {
table: "compose_chart"
}
}
api: {
lookups: [
{

View File

@@ -11,21 +11,24 @@ module: {
]
model: {
id: schema.IdField
handle: schema.HandleField
meta: { goType: "rawJson" }
config: { goType: "types.ModuleConfig" }
fields: { goType: "types.ModuleFieldSet", store: false }
namespace_id: { ident: "namespaceID", goType: "uint64", storeIdent: "rel_namespace" }
name: {sortable: true}
ident: "compose_module"
attributes: {
id: schema.IdField
handle: schema.HandleField
meta: { goType: "rawJson" }
config: { goType: "types.ModuleConfig" }
fields: { goType: "types.ModuleFieldSet", store: false }
namespace_id: { ident: "namespaceID", goType: "uint64", storeIdent: "rel_namespace" }
name: {sortable: true}
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
}
}
filter: {
model: {
struct: {
module_id: { goType: "[]uint64", ident: "moduleID", storeIdent: "id" }
namespace_id: { goType: "uint64", ident: "namespaceID", storeIdent: "rel_namespace" }
handle: { goType: "string" }
@@ -52,12 +55,6 @@ module: {
store: {
ident: "composeModule"
settings: {
rdbms: {
table: "compose_module"
}
}
api: {
lookups: [
{

View File

@@ -11,26 +11,30 @@ moduleField: {
]
model: {
id: schema.IdField
namespace_id: { ident: "namespaceID", goType: "uint64", store: false }
module_id: { sortable: true, ident: "moduleID", goType: "uint64", storeIdent: "rel_module" }
place: { sortable: true, goType: "int" }
kind: { sortable: true, goType: "string" }
name: {sortable: true}
label: {sortable: true}
options: { goType: "types.ModuleFieldOptions" }
config: { goType: "types.ModuleFieldConfig" }
required: { goType: "bool", storeIdent: "is_required" }
multi: { goType: "bool", storeIdent: "is_multi" }
default_value: { goType: "types.RecordValueSet" }
expressions: { goType: "types.ModuleFieldExpr" }
created_at: { goType: "time.Time" }
updated_at: { goType: "*time.Time" }
deleted_at: { goType: "*time.Time" }
ident: "compose_module_field"
attributes: {
id: schema.IdField
namespace_id: { ident: "namespaceID", goType: "uint64", store: false }
module_id: { sortable: true, ident: "moduleID", goType: "uint64", storeIdent: "rel_module" }
place: { sortable: true, goType: "int" }
kind: { sortable: true, goType: "string" }
name: {sortable: true}
label: {sortable: true}
options: { goType: "types.ModuleFieldOptions" }
config: { goType: "types.ModuleFieldConfig" }
required: { goType: "bool", storeIdent: "is_required" }
multi: { goType: "bool", storeIdent: "is_multi" }
default_value: { goType: "types.RecordValueSet" }
expressions: { goType: "types.ModuleFieldExpr" }
created_at: { goType: "time.Time" }
updated_at: { goType: "*time.Time" }
deleted_at: { goType: "*time.Time" }
}
}
filter: {
model: {
struct: {
module_id: { goType: "[]uint64", ident: "moduleID", storeIdent: "rel_module" }
deleted: { goType: "filter.State", storeIdent: "deleted_at" }
}
@@ -92,12 +96,6 @@ moduleField: {
store: {
ident: "composeModuleField"
settings: {
rdbms: {
table: "compose_module_field"
}
}
api: {
lookups: [
{

View File

@@ -6,19 +6,22 @@ import (
namespace: {
model: {
id: schema.IdField
slug: { sortable: true, goType: "string" }
enabled: { goType: "bool" }
meta: { goType: "types.NamespaceMeta" }
name: {}
} & {
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
ident: "compose_namespace"
attributes: {
id: schema.IdField
slug: { sortable: true, goType: "string" }
enabled: { goType: "bool" }
meta: { goType: "types.NamespaceMeta" }
name: {}
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
}
}
filter: {
model: {
struct: {
namespace_id: { goType: "[]uint64", ident: "namespaceID" }
slug: { goType: "string" }
name: { goType: "string" }
@@ -60,12 +63,6 @@ namespace: {
store: {
ident: "composeNamespace"
settings: {
rdbms: {
table: "compose_namespace"
}
}
api: {
lookups: [
{

View File

@@ -10,26 +10,29 @@ page: {
]
model: {
id: schema.IdField
self_id: { sortable: true, ident: "selfID", goType: "uint64" }
module_id: { sortable: true, ident: "moduleID", goType: "uint64", storeIdent: "rel_module" }
namespace_id: { sortable: true, ident: "namespaceID", goType: "uint64", storeIdent: "rel_namespace" }
handle: schema.HandleField
config: { goType: "types.PageConfig" }
blocks: { goType: "types.PageBlocks" }
children: { goType: "types.PageSet", store: false }
visible: { goType: "bool" }
weight: { goType: "int", sortable: true }
title: { goType: "string", sortable: true }
description: { goType: "string" }
ident: "compose_page"
attributes: {
id: schema.IdField
self_id: { sortable: true, ident: "selfID", goType: "uint64" }
module_id: { sortable: true, ident: "moduleID", goType: "uint64", storeIdent: "rel_module" }
namespace_id: { sortable: true, ident: "namespaceID", goType: "uint64", storeIdent: "rel_namespace" }
handle: schema.HandleField
config: { goType: "types.PageConfig" }
blocks: { goType: "types.PageBlocks" }
children: { goType: "types.PageSet", store: false }
visible: { goType: "bool" }
weight: { goType: "int", sortable: true }
title: { goType: "string", sortable: true }
description: { goType: "string" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
}
}
filter: {
model: {
struct: {
namespace_id: { goType: "uint64", ident: "namespaceID", storeIdent: "rel_namespace" }
parent_id: { goType: "uint64", ident: "parentID" }
module_id: { goType: "uint64", ident: "moduleID", storeIdent: "rel_module" }
@@ -104,12 +107,6 @@ page: {
store: {
ident: "composePage"
settings: {
rdbms: {
table: "compose_page"
}
}
api: {
lookups: [
{

View File

@@ -11,23 +11,25 @@ record: {
]
model: {
id: schema.IdField
module_id: { ident: "moduleID", goType: "uint64", storeIdent: "rel_module" }
module: { goType: "*types.Module", store: false }
values: { goType: "types.RecordValueSet", store: false }
namespace_id: { ident: "namespaceID", goType: "uint64", storeIdent: "rel_namespace" }
attributes: {
id: schema.IdField
module_id: { ident: "moduleID", goType: "uint64", storeIdent: "rel_module" }
module: { goType: "*types.Module", store: false }
values: { goType: "types.RecordValueSet", store: false }
namespace_id: { ident: "namespaceID", goType: "uint64", storeIdent: "rel_namespace" }
owned_by: { goType: "uint64" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
owned_by: { goType: "uint64" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
}
}
filter: {
model: {
struct: {
module_id: { goType: "uint64" }
namespace_id: { goType: "uint64" }
query: { goType: "string" }

View File

@@ -14,24 +14,27 @@ exposedModule: {
}
model: {
id: schema.IdField
handle: schema.HandleField
name: { sortable: true }
node_id: { sortable: true, ident: "nodeID", goType: "uint64", storeIdent: "rel_node" }
compose_module_id: { ident: "composeModuleID", goType: "uint64", storeIdent: "rel_compose_module" }
compose_namespace_id: { ident: "composeNamespaceID", goType: "uint64", storeIdent: "rel_compose_namespace" }
fields: { goType: "types.ModuleFieldSet" }
ident: "federation_module_exposed"
attributes: {
id: schema.IdField
handle: schema.HandleField
name: { sortable: true }
node_id: { sortable: true, ident: "nodeID", goType: "uint64", storeIdent: "rel_node" }
compose_module_id: { ident: "composeModuleID", goType: "uint64", storeIdent: "rel_compose_module" }
compose_namespace_id: { ident: "composeNamespaceID", goType: "uint64", storeIdent: "rel_compose_namespace" }
fields: { goType: "types.ModuleFieldSet" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
}
}
filter: {
model: {
struct: {
node_id: { goType: "uint64", ident: "nodeID", storeIdent: "rel_node" }
compose_module_id: { goType: "uint64", ident: "composeModuleID", storeIdent: "rel_compose_module" }
compose_namespace_id: { goType: "uint64", ident: "composeNamespaceID", storeIdent: "rel_compose_namespace" }
@@ -50,12 +53,6 @@ exposedModule: {
store: {
ident: "federationExposedModule"
settings: {
rdbms: {
table: "federation_module_exposed"
}
}
api: {
lookups: [
{

View File

@@ -10,15 +10,18 @@ moduleMapping: {
}
model: {
node_id: { ident: "nodeID", goType: "uint64", primaryKey: true, unique: true }
federation_module_id: { sortable: true, ident: "federationModuleID", goType: "uint64" }
compose_module_id: { sortable: true, ident: "composeModuleID", goType: "uint64" }
compose_namespace_id: { sortable: true, ident: "composeNamespaceID", goType: "uint64" }
field_mapping: { goType: "types.ModuleFieldMappingSet" }
ident: "federation_module_mapping"
attributes: {
node_id: { ident: "nodeID", goType: "uint64", primaryKey: true, unique: true }
federation_module_id: { sortable: true, ident: "federationModuleID", goType: "uint64" }
compose_module_id: { sortable: true, ident: "composeModuleID", goType: "uint64" }
compose_namespace_id: { sortable: true, ident: "composeNamespaceID", goType: "uint64" }
field_mapping: { goType: "types.ModuleFieldMappingSet" }
}
}
filter: {
model: {
struct: {
compose_module_id: { goType: "uint64", ident: "composeModuleID", storeIdent: "rel_compose_module" }
compose_namespace_id: { goType: "uint64", ident: "composeNamespaceID", storeIdent: "rel_compose_namespace" }
federation_module_id: { goType: "uint64", ident: "federationModuleID", storeIdent: "rel_federation_module" }
@@ -30,12 +33,6 @@ moduleMapping: {
store: {
ident: "federationModuleMapping"
settings: {
rdbms: {
table: "federation_module_mapping"
}
}
api: {
lookups: [
{

View File

@@ -12,25 +12,28 @@ node: {
}
model: {
id: schema.IdField
name: {sortable: true}
shared_node_id: { sortable: true, ident: "sharedNodeID", goType: "uint64" }
base_url: { sortable: true, goType: "string", ident: "baseURL" }
status: { sortable: true, goType: "string" }
contact: { sortable: true, goType: "string" }
pair_token: { goType: "string" }
auth_token: { goType: "string" }
ident: "federation_nodes"
attributes: {
id: schema.IdField
name: {sortable: true}
shared_node_id: { sortable: true, ident: "sharedNodeID", goType: "uint64" }
base_url: { sortable: true, goType: "string", ident: "baseURL" }
status: { sortable: true, goType: "string" }
contact: { sortable: true, goType: "string" }
pair_token: { goType: "string" }
auth_token: { goType: "string" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
}
}
filter: {
model: {
struct: {
name: { goType: "string" }
base_url: { goType: "string", ident: "baseURL" }
status: { goType: "string" }
@@ -51,12 +54,6 @@ node: {
store: {
ident: "federationNode"
settings: {
rdbms: {
table: "federation_nodes"
}
}
api: {
lookups: [
{

View File

@@ -10,16 +10,18 @@ nodeSync: {
}
model: {
node_id: { sortable: true, ident: "nodeID", goType: "uint64", primaryKey: true }
module_id: { sortable: true, ident: "moduleID", goType: "uint64" }
sync_type: { sortable: true, goType: "string" }
sync_status: { sortable: true, goType: "string" }
} & {
time_of_action: schema.SortableTimestampField
ident: "federation_nodes_sync"
attributes: {
node_id: { sortable: true, ident: "nodeID", goType: "uint64", primaryKey: true }
module_id: { sortable: true, ident: "moduleID", goType: "uint64" }
sync_type: { sortable: true, goType: "string" }
sync_status: { sortable: true, goType: "string" }
time_of_action: schema.SortableTimestampField
}
}
filter: {
model: {
struct: {
node_id: { goType: "uint64", storeIdent: "rel_node", ident: "nodeID" }
module_id: { goType: "uint64", storeIdent: "rel_module", ident: "moduleID" }
sync_status: { goType: "string", storeIdent: "sync_status" }
@@ -32,12 +34,6 @@ nodeSync: {
store: {
ident: "federationNodeSync"
settings: {
rdbms: {
table: "federation_nodes_sync"
}
}
api: {
lookups: [
{

View File

@@ -14,23 +14,26 @@ sharedModule: {
]
model: {
id: schema.IdField
handle: schema.HandleField
node_id: { sortable: true, ident: "nodeID", goType: "uint64", storeIdent: "rel_node" }
name: {sortable: true}
external_federation_module_id: { sortable: true, ident: "externalFederationModuleID", goType: "uint64", storeIdent: "xref_module", }
fields: { goType: "types.ModuleFieldSet" }
ident: "federation_module_shared"
attributes: {
id: schema.IdField
handle: schema.HandleField
node_id: { sortable: true, ident: "nodeID", goType: "uint64", storeIdent: "rel_node" }
name: {sortable: true}
external_federation_module_id: { sortable: true, ident: "externalFederationModuleID", goType: "uint64", storeIdent: "xref_module", }
fields: { goType: "types.ModuleFieldSet" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
}
}
filter: {
model: {
struct: {
node_id: { goType: "uint64", ident: "nodeID", storeIdent: "rel_node" }
handle: { goType: "string" }
name: { goType: "string" }
@@ -50,12 +53,6 @@ sharedModule: {
store: {
ident: "federationSharedModule"
settings: {
rdbms: {
table: "federation_module_shared"
}
}
api: {
lookups: [
{

View File

@@ -10,24 +10,26 @@ apigw_filter: {
}
model: {
id: schema.IdField
route: { sortable: true, goType: "uint64", storeIdent: "rel_route" }
weight: { sortable: true, goType: "uint64" }
ref: {}
kind: {sortable: true}
enabled: {sortable: true, goType: "bool"}
params: {goType: "types.ApigwFilterParams"}
attributes: {
id: schema.IdField
route: { sortable: true, goType: "uint64", storeIdent: "rel_route" }
weight: { sortable: true, goType: "uint64" }
ref: {}
kind: {sortable: true}
enabled: {sortable: true, goType: "bool"}
params: {goType: "types.ApigwFilterParams"}
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
}
}
filter: {
model: {
struct: {
route_id: {goType: "uint64", ident: "routeID", storeIdent: "rel_route"}
deleted: {goType: "filter.State", storeIdent: "deleted_at"}
disabled: {goType: "filter.State", storeIdent: "enabled"}

View File

@@ -10,23 +10,25 @@ apigw_route: {
}
model: {
id: schema.IdField
endpoint: {sortable: true}
method: {sortable: true}
enabled: {sortable: true, goType: "bool"}
group: {sortable: true, goType: "uint64", storeIdent: "rel_group"}
meta: {goType: "types.ApigwRouteMeta"}
attributes: {
id: schema.IdField
endpoint: {sortable: true}
method: {sortable: true}
enabled: {sortable: true, goType: "bool"}
group: {sortable: true, goType: "uint64", storeIdent: "rel_group"}
meta: {goType: "types.ApigwRouteMeta"}
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
}
}
filter: {
model: {
struct: {
route: {}
query: {goType: "string"}

View File

@@ -6,19 +6,21 @@ import (
application: {
model: {
id: schema.IdField
name: {sortable: true}
owner_id: { ident: "ownerID", goType: "uint64", storeIdent: "rel_owner", sortable: true }
enabled: {sortable: true, goType: "bool"}
weight: {goType: "int", sortable: true}
unify: {goType: "*types.ApplicationUnify"}
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
attributes: {
id: schema.IdField
name: {sortable: true}
owner_id: { ident: "ownerID", goType: "uint64", storeIdent: "rel_owner", sortable: true }
enabled: {sortable: true, goType: "bool"}
weight: {goType: "int", sortable: true}
unify: {goType: "*types.ApplicationUnify"}
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
}
}
filter: {
model: {
struct: {
name: {goType: "string"}
// not sure about the type of flagged_ids
flagged_ids: {goType: "[]uint64"}

View File

@@ -10,20 +10,23 @@ attachment: {
}
model: {
id: schema.IdField
owner_id: { sortable: true, goType: "uint64", storeIdent: "rel_owner", ident: "ownerID"}
kind: {sortable: true}
url: {}
preview_url: {}
name: {sortable: true}
meta: { goType: "types.AttachmentMeta" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
attributes: {
id: schema.IdField
owner_id: { sortable: true, goType: "uint64", storeIdent: "rel_owner", ident: "ownerID"}
kind: {sortable: true}
url: {}
preview_url: {}
name: {sortable: true}
meta: { goType: "types.AttachmentMeta" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
}
}
filter: {
model: {
struct: {
kind: {}
}

View File

@@ -6,30 +6,33 @@ import (
auth_client: {
model: {
id: schema.IdField
handle: schema.HandleField
meta: {goType: "*types.AuthClientMeta"}
secret: {goType: "string"}
scope: {goType: "string"}
valid_grant: {goType: "string"}
redirect_uri: {goType: "string", ident: "redirectURI"}
enabled: {sortable: true, goType: "bool"}
trusted: {sortable: true, goType: "bool"}
valid_from: { goType: "*time.Time" }
expires_at: schema.SortableTimestampNilField
security: {goType: "*types.AuthClientSecurity"}
attributes: {
id: schema.IdField
handle: schema.HandleField
meta: {goType: "*types.AuthClientMeta"}
secret: {goType: "string"}
scope: {goType: "string"}
valid_grant: {goType: "string"}
redirect_uri: {goType: "string", ident: "redirectURI"}
enabled: {sortable: true, goType: "bool"}
trusted: {sortable: true, goType: "bool"}
valid_from: { goType: "*time.Time" }
expires_at: schema.SortableTimestampNilField
security: {goType: "*types.AuthClientSecurity"}
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
owned_by: { goType: "uint64" }
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
owned_by: { goType: "uint64" }
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
}
}
filter: {
model: {
struct: {
client_id: {goType: "[]uint64"}
handle: {goType: "string"}
deleted: {goType: "filter.State", storeIdent: "deleted_at"}

View File

@@ -13,13 +13,15 @@ auth_confirmed_client: {
}
model: {
user_id: { goType: "uint64", primaryKey: true, ident: "userID", storeIdent: "rel_user" }
client_id: { goType: "uint64", primaryKey: true, ident: "clientID", storeIdent: "rel_client" }
confirmed_at: schema.SortableTimestampField
attributes: {
user_id: { goType: "uint64", primaryKey: true, ident: "userID", storeIdent: "rel_user" }
client_id: { goType: "uint64", primaryKey: true, ident: "clientID", storeIdent: "rel_client" }
confirmed_at: schema.SortableTimestampField
}
}
filter: {
model: {
struct: {
user_id: { goType: "uint64", ident: "userID", storeIdent: "rel_client" }
}

View File

@@ -13,21 +13,23 @@ auth_oa2token: {
}
model: {
id: schema.IdField
code: {}
access: {}
refresh: {}
expires_at: schema.SortableTimestampField
created_at: schema.SortableTimestampField
data: { goType: "rawJson" }
client_id: { goType: "uint64", ident: "clientID", storeIdent: "rel_client" }
user_id: { goType: "uint64", ident: "userID", storeIdent: "rel_user" }
remote_addr: {}
user_agent: {}
attributes: {
id: schema.IdField
code: {}
access: {}
refresh: {}
expires_at: schema.SortableTimestampField
created_at: schema.SortableTimestampField
data: { goType: "rawJson" }
client_id: { goType: "uint64", ident: "clientID", storeIdent: "rel_client" }
user_id: { goType: "uint64", ident: "userID", storeIdent: "rel_user" }
remote_addr: {}
user_agent: {}
}
}
filter: {
model: {
struct: {
user_id: { goType: "uint64", ident: "userID" }
}

View File

@@ -13,17 +13,19 @@ auth_session: {
}
model: {
id: { primaryKey: true, expIdent: "ID" }
data: { goType: "[]byte" }
user_id: { goType: "uint64", storeIdent: "rel_user", ident: "userID"}
expires_at: schema.SortableTimestampField
created_at: schema.SortableTimestampField
remote_addr: {}
user_agent: {}
attributes: {
id: { primaryKey: true, expIdent: "ID" }
data: { goType: "[]byte" }
user_id: { goType: "uint64", storeIdent: "rel_user", ident: "userID"}
expires_at: schema.SortableTimestampField
created_at: schema.SortableTimestampField
remote_addr: {}
user_agent: {}
}
}
filter: {
model: {
struct: {
user_id: { goType: "uint64", ident: "userID", storeIdent: "rel_user" }
}

View File

@@ -6,22 +6,24 @@ import (
credential: {
model: {
id: schema.IdField
owner_id: { goType: "uint64", ident: "ownerID", storeIdent: "rel_owner" }
kind: {}
label: {}
credentials: {}
meta: { goType: "rawJson" }
attributes: {
id: schema.IdField
owner_id: { goType: "uint64", ident: "ownerID", storeIdent: "rel_owner" }
kind: {}
label: {}
credentials: {}
meta: { goType: "rawJson" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
last_used_at: schema.SortableTimestampNilField
expires_at: schema.SortableTimestampNilField
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
last_used_at: schema.SortableTimestampNilField
expires_at: schema.SortableTimestampNilField
}
}
filter: {
model: {
struct: {
owner_id: {goType: "uint64", ident: "ownerID", storeIdent: "rel_owner"}
kind: {goType: "string"}
credentials: {goType: "string"}

View File

@@ -6,23 +6,25 @@ import (
dal_connection: {
model: {
id: schema.IdField
handle: schema.HandleField
type: { sortable: true }
attributes: {
id: schema.IdField
handle: schema.HandleField
type: { sortable: true }
meta: { goType: "types.ConnectionMeta" }
config: { goType: "types.ConnectionConfig" }
meta: { goType: "types.ConnectionMeta" }
config: { goType: "types.ConnectionConfig" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
}
}
filter: {
model: {
struct: {
connection_id: {goType: "[]uint64", ident: "connectionID", storeIdent: "id"}
handle: {goType: "string"}
type: {goType: "string"}

View File

@@ -6,21 +6,23 @@ import (
dal_sensitivity_level: {
model: {
id: schema.IdField
handle: schema.HandleField
level: { sortable: true, goType: "int" }
meta: {goType: "types.DalSensitivityLevelMeta"}
attributes: {
id: schema.IdField
handle: schema.HandleField
level: { sortable: true, goType: "int" }
meta: {goType: "types.DalSensitivityLevelMeta"}
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
}
}
filter: {
model: {
struct: {
sensitivity_level_id: {goType: "[]uint64", ident: "sensitivityLevelID", storeIdent: "id"}
deleted: {goType: "filter.State", storeIdent: "deleted_at"}

View File

@@ -10,26 +10,28 @@ data_privacy_request: {
}
model: {
id: schema.IdField
kind: { goType: "types.RequestKind", sortable: true }
status: { goType: "types.RequestStatus", sortable: true }
payload: { goType: "types.DataPrivacyRequestPayloadSet" }
attributes: {
id: schema.IdField
kind: { goType: "types.RequestKind", sortable: true }
status: { goType: "types.RequestStatus", sortable: true }
payload: { goType: "types.DataPrivacyRequestPayloadSet" }
requested_at: schema.SortableTimestampField
requested_by: { goType: "uint64" }
completed_at: schema.SortableTimestampNilField
completed_by: { goType: "uint64" }
requested_at: schema.SortableTimestampField
requested_by: { goType: "uint64" }
completed_at: schema.SortableTimestampNilField
completed_by: { goType: "uint64" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
}
}
filter: {
model: {
struct: {
request_id: {goType: "[]uint64", ident: "requestID", storeIdent: "id" }
requested_by: {goType: "[]uint64", ident: "requestedBy" }
kind: {goType: "[]types.RequestKind"}

View File

@@ -10,20 +10,22 @@ data_privacy_request_comment: {
}
model: {
id: schema.IdField
request_id: { ident: "requestID", goType: "uint64", storeIdent: "rel_request" }
comment: { goType: "string" }
attributes: {
id: schema.IdField
request_id: { ident: "requestID", goType: "uint64", storeIdent: "rel_request" }
comment: { goType: "string" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
}
}
filter: {
model: {
struct: {
request_id: {goType: "[]uint64", ident: "requestID", storeIdent: "rel_request" }
}

1976
system/model/all.gen.go generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -10,21 +10,24 @@ queue: {
}
model: {
id: schema.IdField
consumer: {sortable: true, goType: "string"}
queue: {sortable: true, goType: "string"}
meta: {goType: "types.QueueMeta"}
ident: "queue_settings"
attributes: {
id: schema.IdField
consumer: {sortable: true, goType: "string"}
queue: {sortable: true, goType: "string"}
meta: {goType: "types.QueueMeta"}
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
}
}
filter: {
model: {
struct: {
query: {goType: "string"}
deleted: {goType: "filter.State", storeIdent: "deleted_at"}
}
@@ -45,12 +48,6 @@ queue: {
store: {
settings: {
rdbms: {
table: "queue_settings"
}
}
api: {
lookups: [
{

View File

@@ -11,15 +11,17 @@ queue_message: {
}
model: {
id: schema.IdField
queue: { sortable: true }
payload: { goType: "[]byte" }
processed: schema.SortableTimestampNilField
created: schema.SortableTimestampNilField
attributes: {
id: schema.IdField
queue: { sortable: true }
payload: { goType: "[]byte" }
processed: schema.SortableTimestampNilField
created: schema.SortableTimestampNilField
}
}
filter: {
model: {
struct: {
queue: {}
processed: {goType: "filter.State", storeIdent: "processed"}
}

View File

@@ -10,23 +10,25 @@ reminder: {
}
model: {
id: schema.IdField
resource: { sortable: true }
payload: { goType: "rawJson" }
snooze_count: { goType: "uint" }
assigned_to: { goType: "uint64" }
assigned_by: { goType: "uint64" }
assigned_at: schema.SortableTimestampField
dismissed_by: { goType: "uint64" }
dismissed_at: schema.SortableTimestampNilField
remind_at: schema.SortableTimestampNilField
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
attributes: {
id: schema.IdField
resource: { sortable: true }
payload: { goType: "rawJson" }
snooze_count: { goType: "uint" }
assigned_to: { goType: "uint64" }
assigned_by: { goType: "uint64" }
assigned_at: schema.SortableTimestampField
dismissed_by: { goType: "uint64" }
dismissed_at: schema.SortableTimestampNilField
remind_at: schema.SortableTimestampNilField
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
}
}
filter: {
model: {
struct: {
reminder_id: {goType: "[]uint64", ident: "reminderID", storeIdent: "id"}
resource: {}
assigned_to: {goType: "uint64"}

View File

@@ -6,25 +6,27 @@ import (
report: {
model: {
id: schema.IdField
handle: schema.HandleField
meta: {goType: "*types.ReportMeta"}
scenarios: {goType: "types.ReportScenarioSet"}
sources: {goType: "types.ReportDataSourceSet"}
blocks: {goType: "types.ReportBlockSet"}
attributes: {
id: schema.IdField
handle: schema.HandleField
meta: {goType: "*types.ReportMeta"}
scenarios: {goType: "types.ReportScenarioSet"}
sources: {goType: "types.ReportDataSourceSet"}
blocks: {goType: "types.ReportBlockSet"}
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
owned_by: { goType: "uint64" }
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
owned_by: { goType: "uint64" }
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
}
}
filter: {
model: {
struct: {
report_id: {goType: "[]uint64", storeIdent: "id", ident: "reportID" }
handle: {goType: "string"}
deleted: {goType: "filter.State", storeIdent: "deleted_at"}

View File

@@ -11,23 +11,25 @@ resource_translation: {
}
model: {
id: schema.IdField
lang: { goType: "types.Lang" }
resource: {}
k: {}
message: {}
attributes: {
id: schema.IdField
lang: { goType: "types.Lang" }
resource: {}
k: {}
message: {}
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
owned_by: { goType: "uint64" }
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
owned_by: { goType: "uint64" }
created_by: { goType: "uint64" }
updated_by: { goType: "uint64" }
deleted_by: { goType: "uint64" }
}
}
filter: {
model: {
struct: {
translation_id: {goType: "[]uint64", ident: "translationID" }
lang: {}
resource: {}

View File

@@ -6,19 +6,21 @@ import (
role: {
model: {
id: schema.IdField
name: {sortable: true}
handle: schema.HandleField
meta: {goType: "*types.RoleMeta"}
attributes: {
id: schema.IdField
name: {sortable: true}
handle: schema.HandleField
meta: {goType: "*types.RoleMeta"}
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
archived_at: schema.SortableTimestampNilField
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
archived_at: schema.SortableTimestampNilField
}
}
filter: {
model: {
struct: {
role_id: {goType: "[]uint64", ident: "roleID", storeIdent: "id" }
member_id: {goType: "uint64" }
handle: {goType: "string"}

View File

@@ -9,12 +9,14 @@ role_member: {
}
model: {
user_id: { goType: "uint64", primaryKey: true, storeIdent: "rel_user", ident: "userID" }
role_id: { goType: "uint64", primaryKey: true, storeIdent: "rel_role", ident: "roleID" }
attributes: {
user_id: { goType: "uint64", primaryKey: true, storeIdent: "rel_user", ident: "userID" }
role_id: { goType: "uint64", primaryKey: true, storeIdent: "rel_role", ident: "roleID" }
}
}
filter: {
model: {
struct: {
user_id: {goType: "uint64", ident: "userID", storeIdent: "rel_user" }
role_id: {goType: "uint64", ident: "roleID", storeIdent: "rel_role" }
}

View File

@@ -16,17 +16,20 @@ settings: {
}
model: {
name: { primaryKey: true, ignoreCase: true }
owned_by: { primaryKey: true, goType: "uint64", storeIdent: "rel_owner" }
value: { goType: "rawJson" }
updated_by: { goType: "uint64" }
updated_at: schema.SortableTimestampField
ident: "settings"
attributes: {
name: { primaryKey: true, ignoreCase: true }
owned_by: { primaryKey: true, goType: "uint64", storeIdent: "rel_owner" }
value: { goType: "rawJson" }
updated_by: { goType: "uint64" }
updated_at: schema.SortableTimestampField
}
}
filter: {
expIdent: "SettingsFilter"
model: {
struct: {
prefix: {}
owned_by: { goType: "uint64", storeIdent: "rel_owner" }
}
@@ -35,12 +38,6 @@ settings: {
}
store: {
settings: {
rdbms: {
table: "settings"
}
}
api: {
lookups: [
{

View File

@@ -6,23 +6,25 @@ import (
template: {
model: {
id: schema.IdField
handle: schema.HandleField
language: {sortable: true, goType: "string"}
type: {sortable: true, goType: "types.DocumentType"}
partial: {goType: "bool"}
meta: {goType: "types.TemplateMeta"}
template: {sortable: true, goType: "string"}
attributes: {
id: schema.IdField
handle: schema.HandleField
language: {sortable: true, goType: "string"}
type: {sortable: true, goType: "types.DocumentType"}
partial: {goType: "bool"}
meta: {goType: "types.TemplateMeta"}
template: {sortable: true, goType: "string"}
owner_id: { ident: "ownerID", goType: "uint64", storeIdent: "rel_owner" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
last_used_at: schema.SortableTimestampNilField
owner_id: { ident: "ownerID", goType: "uint64", storeIdent: "rel_owner" }
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
last_used_at: schema.SortableTimestampNilField
}
}
filter: {
model: {
struct: {
template_id: {goType: "[]uint64", ident: "templateID", storeIdent: "id"}
handle: {goType: "string"}
type: {goType: "string"}

View File

@@ -6,22 +6,24 @@ import (
user: {
model: {
id: schema.IdField
handle: schema.HandleField
email: {sortable: true, unique: true, ignoreCase: true}
email_confirmed: {goType: "bool"}
username: {sortable: true, unique: true, ignoreCase: true}
name: {sortable: true}
kind: {sortable: true, goType: "types.UserKind"}
meta: {goType: "*types.UserMeta"}
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
suspended_at: schema.SortableTimestampNilField
attributes: {
id: schema.IdField
handle: schema.HandleField
email: {sortable: true, unique: true, ignoreCase: true}
email_confirmed: {goType: "bool"}
username: {sortable: true, unique: true, ignoreCase: true}
name: {sortable: true}
kind: {sortable: true, goType: "types.UserKind"}
meta: {goType: "*types.UserMeta"}
created_at: schema.SortableTimestampField
updated_at: schema.SortableTimestampNilField
deleted_at: schema.SortableTimestampNilField
suspended_at: schema.SortableTimestampNilField
}
}
filter: {
model: {
struct: {
user_id: {goType: "[]uint64", ident: "userID", storeIdent: "id"}
role_id: {goType: "[]uint64", ident: "roleID"}
email: {goType: "string"}