src/app/core/entity/entity-config.ts

Description

Dynamic configuration for a entity. This allows to change entity metadata based on the configuration.

Index

Properties

Properties

attributes
attributes: { }
Type : { }
Optional

A list of attributes that will be dynamically added/overwritten to the entity.

color
color: string | ColorMapping[]
Type : string | ColorMapping[]
Optional

color used for to highlight this entity type across the app.

enableUserAccounts
enableUserAccounts: boolean
Type : boolean
Optional

Indicates if entities of this type can have associated user accounts. Used to dynamically display user account management panels and features.

extends
extends: string
Type : string
Optional

when a new entity is created, all properties from this class will also be available

hasPII
hasPII: boolean
Type : boolean
Optional

whether the type can contain personally identifiable information (PII)

icon
icon: string
Type : string
Optional

icon used to visualize the entity type

label
label: string
Type : string
Optional

human-readable name/label of the entity in the UI

labelPlural
labelPlural: string
Type : string
Optional

human-readable name/label of the entity in the UI when referring to multiple

route
route: string
Type : string
Optional

base route of views for this entity type

toBlockDetailsAttributes
toBlockDetailsAttributes: EntityBlockConfig
Type : EntityBlockConfig
Optional

Details to be displayed of this entity as a tooltip.

toStringAttributes
toStringAttributes: string[]
Type : string[]
Optional

A list of attributes which should be shown when calling the .toString() method of this entity. E.g. showing the first and last name of a child.

(optional) the default is the ID of the entity (.entityId)

import { EntitySchemaField } from "./schema/entity-schema-field";
import { EntityBlockConfig } from "../basic-datatypes/entity/entity-block/entity-block-config";
import { ColorMapping } from "./model/entity";

/**
 * Dynamic configuration for a entity.
 * This allows to change entity metadata based on the configuration.
 */
export interface EntityConfig {
  /**
   * A list of attributes that will be dynamically added/overwritten to the entity.
   */
  attributes?: { [key: string]: EntitySchemaField };

  /**
   * A list of attributes which should be shown when calling the `.toString()` method of this entity.
   * E.g. showing the first and last name of a child.
   *
   * (optional) the default is the ID of the entity (`.entityId`)
   */
  toStringAttributes?: string[];

  /**
   * Details to be displayed of this entity as a tooltip.
   */
  toBlockDetailsAttributes?: EntityBlockConfig;

  /**
   * human-readable name/label of the entity in the UI
   */
  label?: string;

  /**
   * human-readable name/label of the entity in the UI when referring to multiple
   */
  labelPlural?: string;

  /**
   * icon used to visualize the entity type
   */
  icon?: string;

  /**
   * color used for to highlight this entity type across the app.
   */
  color?: string | ColorMapping[];

  /**
   * base route of views for this entity type
   */
  route?: string;

  /**
   * when a new entity is created, all properties from this class will also be available
   */
  extends?: string;

  /**
   * whether the type can contain personally identifiable information (PII)
   */
  hasPII?: boolean;

  /**
   * Indicates if entities of this type can have associated user accounts.
   * Used to dynamically display user account management panels and features.
   */
  enableUserAccounts?: boolean;
}

results matching ""

    No results matching ""