3
0
corteza/compose/record.cue
Tomaž Jerman 033d2572dd Refactor core compose, system services with new DAL changes
* Define utility packages to work with DAL structs
* Cleanup code
2022-06-14 12:08:16 +02:00

49 lines
1.0 KiB
CUE

package compose
import (
"github.com/cortezaproject/corteza-server/codegen/schema"
)
record: schema.#Resource & {
parents: [
{handle: "namespace"},
{handle: "module"},
]
struct: {
id: schema.IdField
module_id: { ident: "moduleID", goType: "uint64" }
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" }
}
filter: {
struct: {
module_id: { goType: "uint64" }
namespace_id: { goType: "uint64" }
query: { goType: "string" }
deleted: { goType: "filter.State", storeIdent: "deleted_at" }
}
byNilState: ["deleted"]
}
rbac: {
operations: {
"read": {}
"update": {}
"delete": {}
"owner.manage": {}
}
}
}