Skip to main content
Data & Schema

Not translated yet — showing English.

Schema Object Reference

A schema is built from three kinds of object, and objects are built from fields. Entities hold your game's records, parts are reusable groups of fields inside them, and enums are fixed lists of values. This page is the reference for each of them; Building a Game Schema walks through creating them.


Entities, parts and enums

ObjectWhat it isHas its own recordsExample
EntityA standalone object: a table of records your game reads and writes.Yes, listed in DataShips, Pilots, MatchResults
PartA reusable group of fields that only exists inside an entity or another part.No, its values live in the record that includes itStats, Loadout
EnumA fixed list of allowed values for a field.NoShipClass: Fighter, Bomber, Scout

Field kinds

Every field has a kind, which decides what it stores.

KindStoresTargetCardinality
PrimitiveA value directly, of one of the primitive types.—One value
Enum referenceOne value from an enum.An enumOne value
Relationship → entityA link to a record of another entity, by its ID.An entity1-to-1 or 1-to-many
Inclusion ↳ partA part's fields, embedded in this record.A part1-to-1 or 1-to-many

Relationship and inclusion both connect objects, in different ways. A relationship points to a record that exists on its own and can be shared: a pilot points to a ship, and many pilots can point to the same ship. An inclusion embeds a structure that belongs to its parent and has no life of its own: a ship's Stats exist only as part of that ship.

Relationship — link to a separate recordPilotsShipsforeign keyInclusion — embedded structureShipsStats (part)

Primitive types

TypeStores
TextA short string
Long textA multi-line string
IntegerA whole number
NumberA floating-point number
DecimalA fixed-precision number
Booleantrue or false
Date & timeAn ISO timestamp
DateA date, YYYY-MM-DD
UUIDA unique identifier
JSONA structured object
EmailA validated email address
URLA link

Field settings

SettingMeaning
NameLetters, digits and underscores, starting with a letter, up to 64 characters. Id, CreatedAt and UpdatedAt are reserved.
DefaultThe value a new record gets when none is given.
RequiredA record can't be saved without a value.
UniqueNo two records may share a value.
IndexedSpeeds up filtering and sorting on this field.

Entity settings

An entity carries a few settings beyond its fields. They are set in the entity's editor: New ▾ → Entity for a new one, or the pencil next to its name.

SettingWhat it does
Singleton entityThe entity holds exactly one record, with no business key of its own; references to it skip the ID. Use it for global configuration such as match rules. In Data it shows as a single form instead of a list.
Display fieldThe field that stands for a record wherever it is referenced: relation cells, the record panel, the record picker. Auto picks one for you.
Access controlWho may read and write the entity's records. See Access Control.
Owned by playerEach record belongs to one player, stamped by the server when a player creates it. See Player-owned entities.
Read accessFor a player-owned entity: Owner, each player reads only their own records, or Public, everyone may read every record.
On player deleteFor a player-owned entity, required: what happens to a player's records when the player is deleted.
On player deleteThe player's records are
cascade-deleteDeleted with the player.
anonymiseKept, with the owner replaced by a stable anonymous marker.
restrictKept, and the player can't be deleted while any exist.

Raw fields

By default a record may only hold the fields its entity declares. An entity can instead allow raw fields: records may then carry extra keys the schema doesn't define, for free-form data you don't want to model. Raw fields can't be filtered, sorted or indexed, and are only reachable by reading the record. They are switched on through the API or MCP; the Backoffice has no setting for them.

Raw fields trade structure for flexibility

Declared fields are validated, typed and queryable; raw fields are none of these. Use them for data you only ever read back whole, and model anything you'll want to search on.

Schemas pushed from code

An entity or part can come from your game's code instead of the Backoffice, pushed with the SDK's schema tool. It then carries a CODE label: its structure is read-only in the Backoffice and changes come from code, while its records stay editable in Data. Pushing from code can't take over an object of the same name created in the Backoffice.


Next steps

Last updated on 16 Oct 2026