Skip to content

Entities

The entities section is the place which you can design all the business entities that will be used in your new application. They are also known as domain entities.

Fields

An entity contains the following fields to be defined:

Name

The name of entity to be created.

Requirements Rules:

  • Is Required;
  • Must not be a Reserved Keyword;
  • Must start with a letter;
  • Must contains only letters, numbers and the underline char ('_');
  • Max length of 50 chars

Example:

1
2
Entities:
- Name: My_First_Entity


KeyType

The KeyType for Id auto-generated property. It's required for entities that are used in a Repository. Possible valid values are: Guid, Int, Long...

Requirements Rules:

  • Must be an Allowed valid Type. See the valid Types;
  • Must be a type allowed to use in auto-increment fields at database;

Example:

1
2
3
Entities:
- Name: My_First_Entity
  KeyType: Guid


Properties

The list of properties for this entity.

Requirements Rules:

  • Is Required;
  • Each property must have an exclusive 'Name' property value;
  • Each property on list must follows rules as specified in Property;

Example:

1
2
3
4
5
6
7
8
Entities:
- Name: My_First_Entity
  KeyType: Guid
  Properties:
  - Name: Property1
    ...
  - Name: Property2
    ...


Complete Example

See below for a complete example, containing all the properties for the Entities section.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Entities:
- Name: My_First_Entity
  KeyType: Guid
  Properties:
  - Name: Property1
    Type: string # The type set is an allowed valid type
  - Name: Property2
    Type: [string] # The type is set as an array of strings
  - Name: Property3
    Type: bool
    IsNullable: true

- Name: My_Second_Entity
  KeyType: Guid
  Properties:
  - Name: Property1
    Type: My_First_Entity # The type set is another entity included in model

- Name: My_Third_Entity
  KeyType: Guid
  Properties:
  - Name: Property1
    Type: [My_Second_Entity] # The type is set as an array of another entity included in model

Back to top