Like generators, data models have a schema. They capture the fields, relations, and other information needed to generate types, database tables, and much more.
#Datamodel schema is intentionally minimal.
It defines a hierarchy from
Datamodel > Model > Fields & Relations.
The schema is sparce and open, having just what is needed
hof dm to checkpoint and introspect data models.
The following as the core of the
See hof datamodel schemas for the full schema.
#Datamodel schema is intended to be extended.
Since we will be using a Go map for a simple data store,
we will add a CUE field to
#Model to track which
field to use for the index in our types.
We add a new file in our schema directory
We now have an extended schema we can import to define our data models.