File

src/app/core/entity/schema/default-value-config.ts

Description

Describes the default value behaviour of this field, i.e. that this field should automatically be filled with a value when creating a new entity

Index

Properties

Properties

field
field: string
Type : string
Optional

field on the referenced Entity (identified by the id value in localAttribute), which is used as default value (for inherited only)

localAttribute
localAttribute: string
Type : string
Optional

local field holding the reference to an Entity (for inherited only)

mode
mode: DefaultValueMode
Type : DefaultValueMode

What kind of logic is used to generate the default value:

mode: inherited use the value from linked entity field

mode: static use a static default value

mode: dynamic use a placeholder value, see PLACEHOLDERS enum for available options

value
value: any
Type : any
Optional

used as default value in "static" and "dynamic" mode

export interface DefaultValueConfig {
  /**
   * What kind of logic is used to generate the default value:
   *
   *  mode: inherited
   *  use the value from linked entity field
   *
   *  mode: static
   *  use a static default value
   *
   *  mode: dynamic
   *  use a placeholder value, see PLACEHOLDERS enum for available options
   */
  mode: DefaultValueMode;

  /** used as default value in "static" and "dynamic" mode */
  value?: any;

  /** local field holding the reference to an Entity (for inherited only) */
  localAttribute?: string;

  /** field on the referenced Entity (identified by the id value in `localAttribute`), which is used as default value (for inherited only) */
  field?: string;
}

export type DefaultValueMode = "inherited" | "static" | "dynamic";

results matching ""

    No results matching ""