ErFieldModel

9 Jul 20261 minute to read

Interface for a class ErField

Properties

annotation ShapeAnnotationModel

Defines text styling for the ER field row.
Only annotation.style is applicable. The annotation.content
property is ignored — the name property is always used as the
field display text.

constraints ErFieldConstraint[]

Defines additional constraints applied to the field.
Accepts one or more ErFieldConstraint values.

dataType string

Defines the data type label displayed for the field.
This value is treated as display text by the diagram component. Examples
include INT, VARCHAR(255), and DECIMAL(10,2).

id string

Defines the unique identifier of the field within its parent entity.
This identifier is used by runtime APIs such as removeErField. The value
must be unique within the parent ER entity.

isForeignKey boolean

Indicates whether the field is a foreign key.
When enabled, a foreign key indicator is rendered for the field. A field
can be both a primary key and a foreign key.

isPrimaryKey boolean

Indicates whether the field is a primary key.
When enabled, a primary key indicator is rendered for the field. A field
can be both a primary key and a foreign key.

name string

Defines the display name of the field.
This typically represents the database column name or logical attribute
name shown in the ER entity field row.

style ShapeStyleModel

Defines the visual style of the ER field row.
Supports standard shape style properties such as fill, stroke color,
stroke width, opacity, and other supported diagram style values.
Field-level style values override applicable values from field defaults.