Skip to main content

ModelMetadata

@webda/compiler


Interface: ModelMetadata

Defined in: definition.ts:149

Properties​

Actions​

Actions: object

Defined in: definition.ts:244

Actions defined for the model

Index Signature​

[action: string]: object


Aliases?​

optional Aliases?: string[]

Defined in: definition.ts:172

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: definition.ts:213

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?​

optional Configuration?: string

Defined in: definition.ts:153

Export of the model's Parameters class.


Events​

Events: string[]

Defined in: definition.ts:229

Return all events for the model


Identifier​

Identifier: string

Defined in: definition.ts:157

Model identifier


Import​

Import: string

Defined in: definition.ts:161

File to import


Plural​

Plural: string

Defined in: definition.ts:165

Specific plurals for a model


PrimaryKey​

PrimaryKey: string[]

Defined in: definition.ts:221

Return the primary key


PrimaryKeySeparator?​

optional PrimaryKeySeparator?: string

Defined in: definition.ts:225

Separator for the primary key to serialize it


Reflection​

Reflection: object

Defined in: definition.ts:233

Fields reflection

Index Signature​

[field: string]: object


Relations​

Relations: ModelGraph

Defined in: definition.ts:203

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?​

optional Schema?: JSONSchema7

Defined in: definition.ts:151

Typed runtime parameter schema, separate from instance schemas.


Schemas​

Schemas: object

Defined in: definition.ts:176

Schemas defining the model

Input?​

optional Input?: JSONSchema7

Schema for input validation

Output?​

optional Output?: JSONSchema7

Schema for output validation

Stored?​

optional Stored?: JSONSchema7

Schema for stored data validation


Shared?​

optional Shared?: object

Defined in: definition.ts:288

Methods marked @Shared(): copied into the frontend SDK by @webda/sdk

Only present when the model declares some.

Index Signature​

[method: string]: SharedMethodMetadata


ShortName?​

optional ShortName?: string

Defined in: definition.ts:193

If model have a short name


Subclasses​

Subclasses: string[]

Defined in: definition.ts:217

Direct Subclasses of the model