Skip to main content

Entity

Entity is a collection of table structures that exist in an application's database. This menu allows users to create, change, and delete Entities.

The entity that has been created will later be used by the application itself for data processing needs. Each Entity will automatically generate an API which will then be used in the Workflow menu.

Entity Composer View

Editor Entity

  1. Left Sidebar : A collection of Entity lists that have been created.
  2. Diagram Area: Entity diagram along with its relation and data structure.
  3. Right Sidebar : Entity field's property.
  4. Toolbar : Consist of Save button, migrate button, enable media attachment button, and diagram display options.

Data Structure

Data Type

Entities created on this platform support the following defined data types:

Data TypeDescriptionSample usage
idstores id using uuid formatid
textstores text with 1-255 charactersname, departmen
longtextstores text up to more than 255 charactersdescription
numberstores integerage
decimalstores floating numberprice, discount rate
datestores date (yyyy-mm-dd)date joined
timestores time (hh:mm:ss)attendance clock in
datetimestores date dan time (yyyy-mm-dd hh:mm:ss)date created
booleanstores true/false valueis_active
mediastores media (file / image)photo, attachment

Create Entity

To create new entity, click the + icon on the left sidebar. Once Create new entity modal has been shown, input desired entity name then click add. Your new entity will be shown on the diagram area.

Delete, Rename, and Duplicate Entity

To do these actions, click the Entity on the left sidebar.

Three Dots Options

Then click any option according to your action.

Add, Edit, or Remove Entity's Field

In the diagram area, click the Entity whose structure you want to modify. The Entity structure will appear on the right.

Property Entity

Add field

Press Add Field button.

New Field Modal

Enter the field name, data type, maximum field length, default value. If required is checked, then the field cannot be empty. If make this field unique is checked, then the field cannot contain the same data. If there is already the same data, an error will occur when migrating.

Press Save button.

In determining field names, there are field names that have been reserved by the platform and cannot be used by users. You will get error message if your field name already reserved by the platform.

Edit field

Users can change field properties such as names, data types, default values, and unique Click the Entity to be changed. Then select the field to be changed and click the pencil button.

Edit Field Modal

Click Save button to apply the changes.

Note:

1 . Fields with certain data types cannot be changed to other data types.

Data Type beforeSupported target Data Type
idtext, longtext
textlongtext, id, number, decimal, date, time, datetime
longtexttext, id, number, decimal, date, time, datetime
numbertext, longtext, decimal
decimaltext, longtext, number
booleantext, longtext, number
datetext, longtext, datetime
timetext, longtext
datetimetext, longtext
mediafile

Delete field

On the properties sidebar, click trash button to delete the field. Click delete button on the confirmation modal

Migrate

To save changes to all Entities made by the User, it is necessary to do Migrate. The Migrate process will generate a database structure based on the diagram in the Area Diagram.

Editor Entity

If the changes have not been migrated, there will be an indicator in the form of circle on the Migrate button.

Click Migrate button.

Syncronize Entity Changes to Workflow

Since the entity is used by the workflow. We provide auto synchronize the entity changes to workflow that use the entity. Auto synchronize will be executed along with migration process.

Sync Modal

This process will take some minutes depend on how much the affected workflow is. Please wait until the process finished.

Entity Relation

Relation Entity

In the platform it is possible to create relationships between Entities. Generally, when defining Entity relationships in designing a database, the User creates a foreign key field as a reference for the relationship, but on the Platform the foreign key field is automatically created.

Create Relation

As an illustration, there are 2 Entities in the Diagram Area.

Relation Entity

Hover to the Entity to which the relationship will be created. Click the black dot, drag and drop to the destination Entity

Click Migrate button to apply the changes.

Relation Type

  1. 1 - 1 (One to One)
  2. 1 - Many (One to Many)
  3. Many - 1 (Many to One)

Delete Relation

Click the relation to be deleted. Then press Delete on you keyboard.

Media Attachment

Media Attachment is a special entity for storing metadata records from a file uploaded to the application. This entity cannot be renamed or modified in structure. This entity can only be activated and deactivated.

If the Application needs to store files, this Entity must be activated first. In the Diagram Area, click anywhere other than Entity and Relationship.

Media Attachment

Toggle the media attachment from OFF to ON. Once the media attachment has been turned to ON, the media attachment entity will be automatically created.

Sync Modal

Entity Data Authorization

Platform provide authorization entity related to the selected entity. If the selected entity activate the authorization, new authorization entity will be automatically created. This entity can be used in the workfklow.

To activate authorization, click the entity. Then toggle "Authorization" from OFF to ON.

Authorization