3
0

Use model/attribute terminology in CUE files

This commit is contained in:
Denis Arh
2022-08-01 19:01:19 +02:00
parent 353d6ad37d
commit 89eefa5bc2
42 changed files with 109 additions and 109 deletions

View File

@@ -24,7 +24,7 @@ resources: {
features: _allFeaturesDisabled
struct: {
model: {
role_id: { primaryKey: true, goType: "uint64", ident: "roleID", storeIdent: "rel_role" }
resource: { primaryKey: true }
operation: { primaryKey: true }
@@ -67,7 +67,7 @@ resources: {
features: _allFeaturesDisabled
struct: {
model: {
kind: { primaryKey: true }
resource_id: { primaryKey: true, goType: "uint64", ident: "resourceID", storeIdent: "rel_resource" }
name: { primaryKey: true, ignoreCase: true }
@@ -76,7 +76,7 @@ resources: {
filter: {
expIdent: "LabelFilter"
struct: {
model: {
kind: {}
rel_resource: { goType: "[]uint64", ident: "resourceID" }
limit: { goType: "uint" }
@@ -123,7 +123,7 @@ resources: {
features: _allFeaturesDisabled
struct: {
model: {
kind: { primaryKey: true }
resource_id: { primaryKey: true, goType: "uint64", ident: "resourceID", storeIdent: "rel_resource" }
owned_by: { primaryKey: true, goType: "uint64" }
@@ -133,7 +133,7 @@ resources: {
filter: {
expIdent: "FlagFilter"
struct: {
model: {
kind: {}
resource_id: { goType: "[]uint64", ident: "resourceID", storeIdent: "rel_resource" }
owned_by: { goType: "[]uint64", ident: "ownedBy" }
@@ -173,7 +173,7 @@ resources: {
checkFn: false
}
struct: {
model: {
id: schema.IdField
timestamp: schema.SortableTimestampField & { storeIdent: "ts" }
request_origin: {}
@@ -190,7 +190,7 @@ resources: {
filter: {
expIdent: "Filter"
struct: {
model: {
from_timestamp: { goType: "*time.Time" }
to_timestamp: { goType: "*time.Time" }
before_action_id: { goType: "uint64", ident: "beforeActionID" }
@@ -240,7 +240,7 @@ resources: {
features: _allFeaturesDisabled
struct: {
model: {
id: schema.IdField
timestamp: schema.SortableTimestampField & { storeIdent: "ts" }
resource_type: {}
@@ -251,7 +251,7 @@ resources: {
filter: {
expIdent: "ResourceActivityFilter"
struct: {
model: {
from_timestamp: { goType: "*time.Time" }
to_timestamp: { goType: "*time.Time" }
}

View File

@@ -9,7 +9,7 @@ session: {
labels: false
}
struct: {
model: {
id: schema.IdField
workflow_id: { sortable: true, ident: "workflowID", goType: "uint64", storeIdent: "rel_workflow" }
event_type: { sortable: true, goType: "string" }
@@ -28,7 +28,7 @@ session: {
}
filter: {
struct: {
model: {
session_id: { goType: "[]uint64", storeIdent: "id", ident: "sessionID" }
completed: { schema.SortableTimestampNilField, storeIdent: "completed_at" }
created_by: { goType: "[]uint64" }

View File

@@ -5,7 +5,7 @@ import (
)
trigger: {
struct: {
model: {
id: schema.IdField
workflow_id: { sortable: true, ident: "workflowID", goType: "uint64", storeIdent: "rel_workflow" }
step_id: { ident: "stepID", goType: "uint64", storeIdent: "rel_step" }
@@ -26,7 +26,7 @@ trigger: {
}
filter: {
struct: {
model: {
deleted: { goType: "filter.State", storeIdent: "deleted_at" }
disabled: { goType: "filter.State", storeIdent: "enabled" }
trigger_id: { goType: "[]uint64", ident: "triggerID", storeIdent: "id" }

View File

@@ -5,7 +5,7 @@ import (
)
workflow: {
struct: {
model: {
id: schema.IdField
handle: schema.HandleField
meta: { goType: "*types.WorkflowMeta" }
@@ -28,7 +28,7 @@ workflow: {
}
filter: {
struct: {
model: {
deleted: { goType: "filter.State", storeIdent: "deleted_at" }
disabled: { goType: "filter.State", storeIdent: "enabled" }
}

View File

@@ -4,13 +4,13 @@ import (
"strings"
)
#Struct: {
#Model: {
// Each field can be
[name=_]: {"name": name} & #StructField
[name=_]: {"name": name} & #ModelAttribute
}
// logic in struct fields is a bit different
#StructField: {
#ModelAttribute: {
name: #ident
_words: strings.Replace(strings.Replace(name, "_", " ", -1), ".", " ", -1)
@@ -35,10 +35,10 @@ import (
primaryKey: bool | *false
ignoreCase: bool | *false
#StructJsonTag
#ModelAttributeJsonTag
}
IdField: #StructField & {
IdField: #ModelAttribute & {
// Expecting ID field to always have name ID
name: "id"
expIdent: "ID"
@@ -49,7 +49,7 @@ IdField: #StructField & {
goType: "uint64"
}
HandleField: #StructField & {
HandleField: #ModelAttribute & {
// Expecting ID field to always have name handle
name: "handle"
unique: true
@@ -58,17 +58,17 @@ HandleField: #StructField & {
goType: "string"
}
SortableTimestampField: #StructField & {
SortableTimestampField: #ModelAttribute & {
sortable: true
goType: "time.Time"
}
SortableTimestampNilField: #StructField & {
SortableTimestampNilField: #ModelAttribute & {
sortable: true
goType: "*time.Time"
}
#StructJsonTag: {
#ModelAttributeJsonTag: {
name: string
_specs: {field: string | *name, omitEmpty: bool | *false, "string": bool | *false}

View File

@@ -18,11 +18,11 @@ import (
// Fully qualified resource name
fqrn: string | *(platform + "::" + component + ":" + handle)
struct: #Struct
model: #Model
filter: {
"expIdent": #expIdent | *"\(expIdent)Filter"
struct: #Struct
model: #Model
// generate filtering by-nil-state for the specified fields
"byNilState": [...string]
@@ -86,7 +86,7 @@ import (
api?: {
lookups: [...{
_expFields: [ for f in fields {strings.ToTitle(struct[f].expIdent)}]
_expFields: [ for f in fields {strings.ToTitle(model[f].expIdent)}]
"expIdent": "Lookup\(store.expIdent)By" + strings.Join(_expFields, "")
description: string | *""

View File

@@ -20,7 +20,7 @@ _StoreResource: {
goSetType: "\(typePkg).\(res.expIdent)Set"
goFilterType: "\(typePkg).\(res.filter.expIdent)"
struct: [ for f in res.struct if f.store {
struct: [ for f in res.model if f.store {
"ident": f.ident
"expIdent": f.expIdent
"storeIdent": f.storeIdent
@@ -32,17 +32,17 @@ _StoreResource: {
filter: {
// query fields as defined in struct
"query": [ for name in res.filter.query {res.struct[name]}],
"query": [ for name in res.filter.query {res.model[name]}],
// filter by nil state as defined in filter
"byNilState": [ for name in res.filter.byNilState {res.filter.struct[name]}]
"byNilState": [ for name in res.filter.byNilState {res.filter.model[name]}]
// filter by false as defined in filter
"byFalseState": [ for name in res.filter.byFalseState {res.filter.struct[name]}]
"byFalseState": [ for name in res.filter.byFalseState {res.filter.model[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.struct[name]}]
"byValue": [ for name in res.filter.byValue {res.filter.model[name]}]
"byLabel": res.features.labels
"byFlag": res.features.flags
}
@@ -67,7 +67,7 @@ _StoreResource: {
}
deleteByPK: {
primaryKeys: [ for f in res.struct if f.primaryKey {f} ]
primaryKeys: [ for f in res.model if f.primaryKey {f} ]
_pkExpNames: strings.Join([ for f in primaryKeys { f.expIdent } ], "")
"expFnIdent": "Delete\(res.store.expIdent)By\(_pkExpNames)"
}
@@ -85,7 +85,7 @@ _StoreResource: {
// Copy all relevant fields from the struct
"args": [
for name in l.fields {
let f = res.struct[name]
let f = res.model[name]
"ident": f.ident
"storeIdent": f.storeIdent
@@ -126,7 +126,7 @@ _StoreResource: {
"fnIdent": "sortable\(expIdent)Fields"
fields: {
for f in res.struct if f.sortable || f.unique || f.primaryKey {
for f in res.model if f.sortable || f.unique || f.primaryKey {
{
"\(strings.ToLower(f.name))": f.name
"\(strings.ToLower(f.ident))": f.name
@@ -140,8 +140,8 @@ _StoreResource: {
"fnIdent": "collect\(expIdent)CursorValues"
fields: [ for f in res.struct if f.sortable || f.unique || f.primaryKey {f} ]
primaryKeys: [ for f in res.struct if f.primaryKey {f} ]
fields: [ for f in res.model if f.sortable || f.unique || f.primaryKey {f} ]
primaryKeys: [ for f in res.model if f.primaryKey {f} ]
}
checkConstraints: {
@@ -152,9 +152,9 @@ _StoreResource: {
checks: [
for lookup in res.store.api.lookups if lookup.constraintCheck {
lookupFnIdent: lookup.expIdent
fields: [ for name in lookup.fields {res.struct[name]}]
fields: [ for name in lookup.fields {res.model[name]}]
nullConstraint: [
for f in res.struct if list.Contains(lookup.nullConstraint, f.name) {
for f in res.model if list.Contains(lookup.nullConstraint, f.name) {
"expIdent": f.expIdent
},
]

View File

@@ -9,7 +9,7 @@ attachment: {
labels: false
}
struct: {
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" }
@@ -24,7 +24,7 @@ attachment: {
}
filter: {
struct: {
model: {
kind: {}
namespace_id: { goType: "uint64", ident: "namespaceID" }
page_id: { goType: "uint64", ident: "pageID" }

View File

@@ -9,7 +9,7 @@ chart: {
{handle: "namespace"},
]
struct: {
model: {
id: schema.IdField
handle: schema.HandleField
name: {sortable: true}
@@ -22,7 +22,7 @@ chart: {
}
filter: {
struct: {
model: {
chart_id: { goType: "[]uint64", ident: "chartID", storeIdent: "id" }
namespace_id: { goType: "uint64", ident: "namespaceID", storeIdent: "rel_namespace" }
handle: { goType: "string" }

View File

@@ -10,7 +10,7 @@ module: {
{handle: "namespace"},
]
struct: {
model: {
id: schema.IdField
handle: schema.HandleField
meta: { goType: "rawJson" }
@@ -25,7 +25,7 @@ module: {
}
filter: {
struct: {
model: {
module_id: { goType: "[]uint64", ident: "moduleID", storeIdent: "id" }
namespace_id: { goType: "uint64", ident: "namespaceID", storeIdent: "rel_namespace" }
handle: { goType: "string" }

View File

@@ -10,7 +10,7 @@ moduleField: {
{handle: "module"},
]
struct: {
model: {
id: schema.IdField
namespace_id: { ident: "namespaceID", goType: "uint64", store: false }
module_id: { sortable: true, ident: "moduleID", goType: "uint64", storeIdent: "rel_module" }
@@ -30,7 +30,7 @@ moduleField: {
}
filter: {
struct: {
model: {
module_id: { goType: "[]uint64", ident: "moduleID", storeIdent: "rel_module" }
deleted: { goType: "filter.State", storeIdent: "deleted_at" }
}

View File

@@ -5,7 +5,7 @@ import (
)
namespace: {
struct: {
model: {
id: schema.IdField
slug: { sortable: true, goType: "string" }
enabled: { goType: "bool" }
@@ -18,7 +18,7 @@ namespace: {
}
filter: {
struct: {
model: {
namespace_id: { goType: "[]uint64", ident: "namespaceID" }
slug: { goType: "string" }
name: { goType: "string" }

View File

@@ -9,7 +9,7 @@ page: {
{handle: "namespace"},
]
struct: {
model: {
id: schema.IdField
self_id: { sortable: true, ident: "selfID", goType: "uint64" }
module_id: { sortable: true, ident: "moduleID", goType: "uint64", storeIdent: "rel_module" }
@@ -29,7 +29,7 @@ page: {
}
filter: {
struct: {
model: {
namespace_id: { goType: "uint64", ident: "namespaceID", storeIdent: "rel_namespace" }
parent_id: { goType: "uint64", ident: "parentID" }
module_id: { goType: "uint64", ident: "moduleID", storeIdent: "rel_module" }

View File

@@ -10,7 +10,7 @@ record: {
{handle: "module"},
]
struct: {
model: {
id: schema.IdField
module_id: { ident: "moduleID", goType: "uint64" }
module: { goType: "*types.Module", store: false }
@@ -27,7 +27,7 @@ record: {
}
filter: {
struct: {
model: {
module_id: { goType: "uint64" }
namespace_id: { goType: "uint64" }
query: { goType: "string" }

View File

@@ -13,7 +13,7 @@ exposedModule: {
labels: false
}
struct: {
model: {
id: schema.IdField
handle: schema.HandleField
name: { sortable: true }
@@ -31,7 +31,7 @@ exposedModule: {
}
filter: {
struct: {
model: {
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" }

View File

@@ -9,7 +9,7 @@ moduleMapping: {
labels: false
}
struct: {
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" }
@@ -18,7 +18,7 @@ moduleMapping: {
}
filter: {
struct: {
model: {
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" }

View File

@@ -11,7 +11,7 @@ node: {
sorting: false
}
struct: {
model: {
id: schema.IdField
name: {sortable: true}
shared_node_id: { sortable: true, ident: "sharedNodeID", goType: "uint64" }
@@ -30,7 +30,7 @@ node: {
}
filter: {
struct: {
model: {
name: { goType: "string" }
base_url: { goType: "string", ident: "baseURL" }
status: { goType: "string" }

View File

@@ -9,7 +9,7 @@ nodeSync: {
labels: false
}
struct: {
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" }
@@ -19,7 +19,7 @@ nodeSync: {
}
filter: {
struct: {
model: {
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" }

View File

@@ -13,7 +13,7 @@ sharedModule: {
{handle: "node"},
]
struct: {
model: {
id: schema.IdField
handle: schema.HandleField
node_id: { sortable: true, ident: "nodeID", goType: "uint64", storeIdent: "rel_node" }
@@ -30,7 +30,7 @@ sharedModule: {
}
filter: {
struct: {
model: {
node_id: { goType: "uint64", ident: "nodeID", storeIdent: "rel_node" }
handle: { goType: "string" }
name: { goType: "string" }

View File

@@ -9,7 +9,7 @@ apigw_filter: {
labels: false
}
struct: {
model: {
id: schema.IdField
route: { sortable: true, goType: "uint64", storeIdent: "rel_route" }
weight: { sortable: true, goType: "uint64" }
@@ -27,7 +27,7 @@ apigw_filter: {
}
filter: {
struct: {
model: {
route_id: {goType: "uint64", ident: "routeID", storeIdent: "rel_route"}
deleted: {goType: "filter.State", storeIdent: "deleted_at"}
disabled: {goType: "filter.State", storeIdent: "enabled"}

View File

@@ -9,7 +9,7 @@ apigw_route: {
labels: false
}
struct: {
model: {
id: schema.IdField
endpoint: {sortable: true}
method: {sortable: true}
@@ -26,7 +26,7 @@ apigw_route: {
}
filter: {
struct: {
model: {
route: {}
query: {goType: "string"}

View File

@@ -5,7 +5,7 @@ import (
)
application: {
struct: {
model: {
id: schema.IdField
name: {sortable: true}
owner_id: { ident: "ownerID", goType: "uint64", storeIdent: "rel_owner", sortable: true }
@@ -18,7 +18,7 @@ application: {
}
filter: {
struct: {
model: {
name: {goType: "string"}
// not sure about the type of flagged_ids
flagged_ids: {goType: "[]uint64"}

View File

@@ -9,7 +9,7 @@ attachment: {
labels: false
}
struct: {
model: {
id: schema.IdField
owner_id: { sortable: true, goType: "uint64", storeIdent: "rel_owner", ident: "ownerID"}
kind: {sortable: true}
@@ -23,7 +23,7 @@ attachment: {
}
filter: {
struct: {
model: {
kind: {}
}

View File

@@ -5,7 +5,7 @@ import (
)
auth_client: {
struct: {
model: {
id: schema.IdField
handle: schema.HandleField
meta: {goType: "*types.AuthClientMeta"}
@@ -29,7 +29,7 @@ auth_client: {
}
filter: {
struct: {
model: {
client_id: {goType: "[]uint64"}
handle: {goType: "string"}
deleted: {goType: "filter.State", storeIdent: "deleted_at"}

View File

@@ -12,14 +12,14 @@ auth_confirmed_client: {
checkFn: false
}
struct: {
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
}
filter: {
struct: {
model: {
user_id: { goType: "uint64", ident: "userID", storeIdent: "rel_client" }
}

View File

@@ -12,7 +12,7 @@ auth_oa2token: {
checkFn: false
}
struct: {
model: {
id: schema.IdField
code: {}
access: {}
@@ -27,7 +27,7 @@ auth_oa2token: {
}
filter: {
struct: {
model: {
user_id: { goType: "uint64", ident: "userID" }
}

View File

@@ -12,7 +12,7 @@ auth_session: {
checkFn: false
}
struct: {
model: {
id: { primaryKey: true, expIdent: "ID" }
data: { goType: "[]byte" }
user_id: { goType: "uint64", storeIdent: "rel_user", ident: "userID"}
@@ -23,7 +23,7 @@ auth_session: {
}
filter: {
struct: {
model: {
user_id: { goType: "uint64", ident: "userID" }
}

View File

@@ -5,7 +5,7 @@ import (
)
credential: {
struct: {
model: {
id: schema.IdField
owner_id: { goType: "uint64", ident: "ownerID", storeIdent: "rel_owner" }
kind: {}
@@ -21,7 +21,7 @@ credential: {
}
filter: {
struct: {
model: {
owner_id: {goType: "uint64", ident: "ownerID", storeIdent: "rel_owner"}
kind: {goType: "string"}
credentials: {goType: "string"}

View File

@@ -5,7 +5,7 @@ import (
)
dal_connection: {
struct: {
model: {
id: schema.IdField
name: { sortable: true, goType: "string" }
handle: schema.HandleField
@@ -29,7 +29,7 @@ dal_connection: {
}
filter: {
struct: {
model: {
connection_id: {goType: "[]uint64", ident: "connectionID", storeIdent: "id"}
handle: {goType: "string"}
type: {goType: "string"}

View File

@@ -5,7 +5,7 @@ import (
)
dal_sensitivity_level: {
struct: {
model: {
id: schema.IdField
handle: schema.HandleField
level: { sortable: true, goType: "int" }
@@ -20,7 +20,7 @@ dal_sensitivity_level: {
}
filter: {
struct: {
model: {
sensitivity_level_id: {goType: "[]uint64", ident: "sensitivityLevelID", storeIdent: "id"}
deleted: {goType: "filter.State", storeIdent: "deleted_at"}

View File

@@ -9,7 +9,7 @@ data_privacy_request: {
labels: false
}
struct: {
model: {
id: schema.IdField
kind: { goType: "types.RequestKind", sortable: true }
status: { goType: "types.RequestStatus", sortable: true }
@@ -29,7 +29,7 @@ data_privacy_request: {
}
filter: {
struct: {
model: {
request_id: {goType: "[]uint64", ident: "requestID", storeIdent: "id" }
requested_by: {goType: "[]uint64", ident: "requestedBy" }
kind: {goType: "[]types.RequestKind"}

View File

@@ -9,7 +9,7 @@ data_privacy_request_comment: {
labels: false
}
struct: {
model: {
id: schema.IdField
request_id: { ident: "requestID", goType: "uint64", storeIdent: "rel_request" }
comment: { goType: "string" }
@@ -23,7 +23,7 @@ data_privacy_request_comment: {
}
filter: {
struct: {
model: {
request_id: {goType: "[]uint64", ident: "requestID", storeIdent: "rel_request" }
}

View File

@@ -9,7 +9,7 @@ queue: {
labels: false
}
struct: {
model: {
id: schema.IdField
consumer: {sortable: true, goType: "string"}
queue: {sortable: true, goType: "string"}
@@ -24,7 +24,7 @@ queue: {
}
filter: {
struct: {
model: {
query: {goType: "string"}
deleted: {goType: "filter.State", storeIdent: "deleted_at"}
}

View File

@@ -10,7 +10,7 @@ queue_message: {
checkFn: false
}
struct: {
model: {
id: schema.IdField
queue: { sortable: true }
payload: { goType: "[]byte" }
@@ -19,7 +19,7 @@ queue_message: {
}
filter: {
struct: {
model: {
queue: {}
processed: {goType: "filter.State", storeIdent: "processed"}
}

View File

@@ -9,7 +9,7 @@ reminder: {
labels: false
}
struct: {
model: {
id: schema.IdField
resource: { sortable: true }
payload: { goType: "rawJson" }
@@ -26,7 +26,7 @@ reminder: {
}
filter: {
struct: {
model: {
reminder_id: {goType: "[]uint64", ident: "reminderID", storeIdent: "id"}
resource: {}
assigned_to: {goType: "uint64"}

View File

@@ -5,7 +5,7 @@ import (
)
report: {
struct: {
model: {
id: schema.IdField
handle: schema.HandleField
meta: {goType: "*types.ReportMeta"}
@@ -24,7 +24,7 @@ report: {
}
filter: {
struct: {
model: {
report_id: {goType: "[]uint64", storeIdent: "id", ident: "reportID" }
handle: {goType: "string"}
deleted: {goType: "filter.State", storeIdent: "deleted_at"}

View File

@@ -10,7 +10,7 @@ resource_translation: {
checkFn: false
}
struct: {
model: {
id: schema.IdField
lang: { goType: "types.Lang" }
resource: {}
@@ -27,7 +27,7 @@ resource_translation: {
}
filter: {
struct: {
model: {
translation_id: {goType: "[]uint64", ident: "translationID" }
lang: {}
resource: {}

View File

@@ -5,7 +5,7 @@ import (
)
role: {
struct: {
model: {
id: schema.IdField
name: {sortable: true}
handle: schema.HandleField
@@ -18,7 +18,7 @@ role: {
}
filter: {
struct: {
model: {
role_id: {goType: "[]uint64", ident: "roleID", storeIdent: "id" }
member_id: {goType: "uint64" }
handle: {goType: "string"}

View File

@@ -8,13 +8,13 @@ role_member: {
checkFn: false
}
struct: {
model: {
user_id: { goType: "uint64", primaryKey: true, storeIdent: "rel_user", ident: "userID" }
role_id: { goType: "uint64", primaryKey: true, storeIdent: "rel_role", ident: "roleID" }
}
filter: {
struct: {
model: {
user_id: {goType: "uint64", ident: "userID", storeIdent: "rel_user" }
role_id: {goType: "uint64", ident: "roleID", storeIdent: "rel_role" }
}

View File

@@ -15,7 +15,7 @@ settings: {
checkFn: false
}
struct: {
model: {
name: { primaryKey: true, ignoreCase: true }
owned_by: { primaryKey: true, goType: "uint64", storeIdent: "rel_owner" }
value: { goType: "rawJson" }
@@ -26,7 +26,7 @@ settings: {
filter: {
expIdent: "SettingsFilter"
struct: {
model: {
prefix: {}
owned_by: { goType: "uint64", storeIdent: "rel_owner" }
}

View File

@@ -5,7 +5,7 @@ import (
)
template: {
struct: {
model: {
id: schema.IdField
handle: schema.HandleField
language: {sortable: true, goType: "string"}
@@ -22,7 +22,7 @@ template: {
}
filter: {
struct: {
model: {
template_id: {goType: "[]uint64", ident: "templateID", storeIdent: "id"}
handle: {goType: "string"}
type: {goType: "string"}

View File

@@ -5,7 +5,7 @@ import (
)
user: {
struct: {
model: {
id: schema.IdField
handle: schema.HandleField
email: {sortable: true, unique: true, ignoreCase: true}
@@ -21,7 +21,7 @@ user: {
}
filter: {
struct: {
model: {
user_id: {goType: "[]uint64", ident: "userID", storeIdent: "id"}
role_id: {goType: "[]uint64", ident: "roleID"}
email: {goType: "string"}