Skip to main content

Entities configuration

The config row in the hellodb table should contain a definition of the entities in the database.

For each entities and so table, this is the specification:

players:
toString: $first_name $last_name
label:
en: Player
fr: Joueur
labelPlural:
en: Players
fr: Joueurs
newButton:
en: New player
fr: Nouveau joueur
editButton:
en: Edit player
fr: Modifier joueur
deleteButton:
en: Delete player
fr: Supprimer le joueur
orderBy: last_name
fields:
...
PropertyRequiredUsage
playersyesAn unique identifier defining the entity and the table name
toStringyesHow to calculate the name of the entity to be rendered from this table, using its fields. Should contain column names (not SmartFields) preceded by $
labelyesA translatable property defining the entity name in the singular form
labelPluralyesA translatable property defining the entity name in the plural form
newButtonyesA translatable property defining the text for the "new" button
editButtonyesA translatable property defining the text for the "edit" button
deleteButtonyesA translatable property defining the text for the "delete" button
fieldsyesDefines the configuration for each field of the table (see fields configuration)
orderBynoAllows to automatically sort the entites list from a field