ModelMetadata
Interface: ModelMetadata
Defined in: compiler/src/definition.ts:208
Model metadata interface
Properties
Actions
Actions:
object
Defined in: compiler/src/definition.ts:303
Actions defined for the model
Index Signature
[action: string]: object
Aliases?
optionalAliases?:string[]
Defined in: compiler/src/definition.ts:231
Former identifiers of the model, from its @WebdaAlias tags (namespace-completed)
Rows stored under one of them are read as this model. Absent when the model has none: the runtime defaults it to an empty list.
Ancestors
Ancestors:
string[]
Defined in: compiler/src/definition.ts:272
Ancestors of the model
Ordered from the closest to the farest CoreModel is ignored
class Test extends Parent extends GrandParent extends CoreModel ["Parent", "GrandParent"]
Configuration?
optionalConfiguration?:string
Defined in: compiler/src/definition.ts:212
Export of the model's Parameters class.
Events
Events:
string[]
Defined in: compiler/src/definition.ts:288
Return all events for the model
Identifier
Identifier:
string
Defined in: compiler/src/definition.ts:216
Model identifier
Import
Import:
string
Defined in: compiler/src/definition.ts:220
File to import
Plural
Plural:
string
Defined in: compiler/src/definition.ts:224
Specific plurals for a model
PrimaryKey
PrimaryKey:
string[]
Defined in: compiler/src/definition.ts:280
Return the primary key
PrimaryKeySeparator?
optionalPrimaryKeySeparator?:string
Defined in: compiler/src/definition.ts:284
Separator for the primary key to serialize it
Reflection
Reflection:
object
Defined in: compiler/src/definition.ts:292
Fields reflection
Index Signature
[field: string]: object
Relations
Relations:
ModelGraph
Defined in: compiler/src/definition.ts:262
Models graph
Typescript does not have reflection, we therefore deduct the relations on compilation time and inject in the module
The parent is define by a ModelParent type on the model The links are attribute of types ModelLink
Schema?
optionalSchema?:JSONSchema7
Defined in: compiler/src/definition.ts:210
Typed runtime parameter schema, separate from instance schemas.
Schemas
Schemas:
object
Defined in: compiler/src/definition.ts:235
Schemas defining the model
Input?
optionalInput?:JSONSchema7
Schema for input validation
Output?
optionalOutput?:JSONSchema7
Schema for output validation
Stored?
optionalStored?:JSONSchema7
Schema for stored data validation
Shared?
optionalShared?:object
Defined in: compiler/src/definition.ts:355
Methods marked @Shared(): copied into the frontend SDK by @webda/sdk
Only present when the model declares some.
Index Signature
[method: string]: SharedMethodMetadata
ShortName?
optionalShortName?:string
Defined in: compiler/src/definition.ts:252
If model have a short name
Subclasses
Subclasses:
string[]
Defined in: compiler/src/definition.ts:276
Direct Subclasses of the model