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:

Last updated