G
G
Gemini Docs
Search…
Entities
The Gemini schema is very simple and self-explanatory. It is a simple YAML where you can put the list of your entities. The Gemini platform automatically reads entities and fields and provide for you all the API for inserting, updating and retrieving data with validation features.

Common Entities

Here for example a very basic schema with two entities: Product and Category and some basic fields. Each entity always has a name and a list of fields.
Common entities are those one that can contains multiple records (like a table in SQL or a collection in NoSQL). For this reason each entity has also a logical key to identify a single record. The logical key (lk) can contain one or more fields, usually strings or sequence numbers.
# EXAMPLE - PRODUCT AND CATEGORY SCHEMA DEFINITION
​
type: ENTITY
entity:
name: CATEGORY
displayName: Category
lk: [id]
fields:
- name: id
type: STRING
required: true
- name: description
type: STRING
​
---
​
type: ENTITY
entity:
name: PRODUCT
displayName: Product
lk: [id]
fields:
- name: id
type: STRING
required: true
- name: name
type: STRING
- name: description
type: STRING
- name: available
type: BOOL
​

Entity Configuration

From the previous schema you can see some important configurations. Each Entity has:
Property
Description
Required
name
The name of the Entity. It is gonna to be used in all the Gemini framework, also with low level APIs in order to retrieve the Entity Data or Configuration
true
lk
List of logical keys for the entity. Must be one or more fields of basic types. Usually numbers and strings. The fields order matters.
true
displayName
If you want a different display name, especially for the GUI parts, when you need to interact with entity configuration
false
fields
The list of fields for the Entity
true