EntityTypes
Entity type nodes declare an entity with its fields. It can be used as an entity schema to create new entities outside of entity collections.
Entity Fields
An entity field describes a property of the entity with its data type and size.
Attribute | Description | Data Type |
---|---|---|
Name | Name of the field. It is recommended to use a unique name for each field. | System.String |
DataType | Specifies the data type of the field. | System.String |
Length | If the data type is a string, this can be set to the fixed string size. | System.Int32 |
ArraySize | If the data type is an array, this can be set to the fixed array size. | System.Int32 |
IsKey | Flag if the field is a key value | System.Boolean |
NOTE
Note that the entity types always require a field called
Id
of typeSystem.Guid
as a main key. This field should not be deleted.
Example:
The following example defines a string array StringArray
, where as the array size comprehends three elements of strings with length of 25 characters.
"EntityTypes": [
{
"Id": "fa006cb3-05fc-4c29-a511-cc83dcf99a6b",
"Name": "EntityTypeA",
"Fields": [
{
"Name": "Id",
"DataType": "System.Guid",
"IsKey": true
},
{
"Name": "Value",
"DataType": "System.Double"
},
{
"Length": 255,
"Name": "Description",
"DataType": "System.String"
},
{
"ArraySize": 3,
"Length": 25,
"Name": "StringArray",
"DataType": "System.String[]"
}
],
"Properties": []
}
],