Typy polí (Field Types)
Základní typy
| Typ |
Popis |
Atributy |
varchar |
Textový řetězec |
maxLength, trim |
text |
Dlouhý text |
rowsMin, rowsMax |
int |
Celé číslo |
min, max |
float |
Desetinné číslo |
min, max, decimalPlaces |
bool |
Boolean |
default |
date |
Datum |
useNumericFormat |
datetime |
Datum a čas |
minuteStep |
enum |
Výběr z možností |
options, default, isSorted |
enumMulti |
Vícenásobný výběr |
options, default |
Speciální typy
| Typ |
Popis |
Atributy |
link |
Vazba na entitu |
entity, audited |
linkMultiple |
Vícenásobná vazba |
entity |
linkParent |
Polymorfní vazba |
entityList |
file |
Soubor |
accept, maxSize |
attachmentMultiple |
Více souborů |
accept, maxSize |
image |
Obrázek |
previewSize |
address |
Adresa |
- |
currency |
Měna |
conversionDisabled |
autoincrement |
Auto číslo |
pattern |
foreign |
Cizí pole |
link, field |
Příklady definice polí
fields:
# Textové pole
name:
type: "varchar"
label: "Název"
required: true
maxLength: 255
trim: true
# Enum s barvami
status:
type: "enum"
label: "Stav"
options:
- value: "New"
label: "Nový"
color: "#17a2b8"
style:
fontWeight: "bold"
- value: "InProgress"
label: "Probíhá"
color: "#ffc107"
- value: "Completed"
label: "Dokončeno"
color: "#28a745"
default: "New"
required: true
audited: true
# Link na jinou entitu
account:
type: "link"
label: "Organizace"
entity: "Account"
required: true
audited: true
# Měna
amount:
type: "currency"
label: "Částka"
min: 0
decimalPlaces: 2
currencyField: "currency"
# Auto-increment číslo
number:
type: "autoincrement"
label: "Číslo"
pattern: "SRV-{YYYY}-{0000}"
readonly: true
➡️ Pokračujte na Workflow.