Skip to main content

Interface: EntitySchema<M>

Specification for defining an entity

Type parameters

NameType
Mextends Object = any

Properties

customId

Optional customId: boolean | EnumValues | "optional"

If this prop is not set, the ID of the document will be created by the datasource.

You can set the value to 'true' to force the users to choose the ID.

You can set the value to 'optional' to allow the users to choose the ID, If the ID is empty, an automatic ID will be set.

You can also pass a set of values (as an EnumValues object) to allow users to pick from only those.

Defined in

models/entities.ts:31


defaultValues

Optional defaultValues: any

When creating a new entity, set some values as already initialized

Defined in

models/entities.ts:41


description

Optional description: string

Description of this entity

Defined in

models/entities.ts:17


name

name: string

Singular name of the entity as displayed in an Add button . E.g. Product

Defined in

models/entities.ts:12


properties

properties: PropertiesOrBuilder<M>

Set of properties that compose an entity

Defined in

models/entities.ts:36


views

Optional views: EntityCustomView<M>[]

Array of builders for rendering additional panels in an entity view. Useful if you need to render custom views

Defined in

models/entities.ts:47