Custom properties are key/value pairs defined on objects to add some flexible context or documentation beside the schema. They are a good complement to textual documentation, being less expressive but more structured.

Here is an example: {color: red, pii}

Keys are identifiers and values can have several forms:

  • boolean, ex: {pii: true}
  • number, ex: {size: 12}
  • identifier, ex: {color: red}
  • array, ex: {tags: [pii, sensitive]}
  • omitted, ex: {autoIncrement}

You can use any key/value pair, they will be kept in the model.

Some specific keys are standardized for certain objects and can be interpreted by generators or in Azimutt, see below.

Entity properties #

Here are the standardized properties for entities:

  • view, define the entity as a view, use it to define the view query
    • ex: {view: "SELECT * FROM users"}
  • color, to define the entity default color for Azimutt layouts, values: red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose, gray
    • ex: {color: red}
  • tags, to define tags for the entity
    • ex: {tags: [pii, "owner:team1"]}

Here is an example:

users {color: red, tags: [pii, deprecated]}

Some others are considered but not handled yet:

  • icon, show an icon in the entity header, values: email, folder, home, user, users...
    • ex: {icon: user}
  • position, define the default position when added to a layout, the value should be an array with two numbers, left and top
    • ex: {position: [15, 10]}
  • notes, define default notes for the entity (similar to doc but saved in Azimutt)
    • ex: {notes: "stored in Azimutt"}
  • deprecated, will be added to tags in Azimutt
    • ex: {deprecated}

Entity attribute properties #

Here are the standardized properties for entity attributes:

  • autoIncrement, for primary keys with auto-increment, ex: {autoIncrement}
  • hidden, to make the column not visible by default on layouts, ex: {hidden}
  • tags, to define default tags for the attribute, ex: {tags: [pii]}

Here is an example:

users
  id {autoIncrement, tags: [pii]}

Some others are considered but not handled yet:

  • notes, define default notes for the entity (similar to doc but saved in Azimutt)
    • ex: {notes: "stored in Azimutt"}
  • deprecated, will be added to tags in Azimutt
    • ex: {deprecated}

Relation properties #

Here are the standardized properties for relations:

  • onUpdate, values should be in: no action, set null, set default, cascade, restrict
  • onDelete, values should be in: no action, set null, set default, cascade, restrict

An example with all the properties:

rel posts(author) -> users(id) {onUpdate: "no action", onDelete: cascade}

Type properties #

None for now