| Type | Storage | Editor |
|---|
text | string | text input / textarea (multiline config) |
number | number | number input (min, max, step, integer config) |
boolean | boolean | switch |
date | ISO 8601 string | date + time picker |
file | URL string | file uploader |
reference | UUID string | record selector (targetSchema config) |
select | string | dropdown (options config) |
These store the same way as file (URL string) but render specialized previews:
| Type | Accept | Preview |
|---|
image | image/* | image with dimensions |
video | video/* | video player with duration |
audio | audio/* | audio player with waveform |
svg | image/svg+xml | inline SVG render |
pdf | application/pdf | PDF viewer |
model3d | .gltf,.glb,.usdz,.obj | 3D viewer |
lottie | .json (Lottie) | Lottie player |
font | .woff2,.ttf,.otf | font sample |
These store as strings but validate and render specifically:
| Type | Validation | Editor |
|---|
url | URL format | URL input |
email | email format | email input |
color | hex format | color picker |
richtext | HTML | rich-text editor (Tiptap) |
code | varies | code editor (CodeMirror, syntax-highlighted) |
| Type | Storage | Editor |
|---|
array | [...] | repeatable field group |
json | {...} | arbitrary JSON object editor |
vector<T> | [T, T, ...] | typed repeatable |
map<T> | { key: T, ... } | key-value pairs |
- Use the most specific type that fits. Prefer
image over file for images so the preview renders correctly and codegen knows.
- Use
reference for one-to-many relationships, array of reference for many-to-many.
- Use
select over text when the set of valid values is known.
- Use
json only as an escape hatch. If you're using json a lot, you probably need more schemas.