FieldMeta
FieldMeta =
object
Defined in: packages/schema/src/field.ts:11
Everything a field’s builder methods have set, from which the resource’s FieldModel is built.
Properties
Section titled “Properties”access?
Section titled “access?”
optionalaccess?:FieldAccess
Defined in: packages/schema/src/field.ts:33
Its role rules (.access()).
optionalai?:object
Defined in: packages/schema/src/field.ts:63
How a job fills it (.ai()).
prompt
Section titled “prompt”prompt:
string
The prompt the job fills it from.
aliases
Section titled “aliases”aliases:
string[]
Defined in: packages/schema/src/field.ts:25
Other names filters may use for it (.alias()).
column?
Section titled “column?”
optionalcolumn?:string
Defined in: packages/schema/src/field.ts:15
The column, when it is not the snake_case of the field’s name (.column()).
dbDefault?
Section titled “dbDefault?”
optionaldbDefault?:boolean
Defined in: packages/schema/src/field.ts:31
Whether the database supplies a value when none is given (.dbDefault()).
defaultValue?
Section titled “defaultValue?”
optionaldefaultValue?:unknown
Defined in: packages/schema/src/field.ts:29
The value of .default().
enumValues?
Section titled “enumValues?”
optionalenumValues?:string[]
Defined in: packages/schema/src/field.ts:37
An enum’s values (f.enum()).
optionalfile?:FileOptions
Defined in: packages/schema/src/field.ts:61
A file field’s settings (f.file()).
filterable
Section titled “filterable”filterable:
boolean
Defined in: packages/schema/src/field.ts:21
Whether filters may use it (.filterable()).
hasDefault
Section titled “hasDefault”hasDefault:
boolean
Defined in: packages/schema/src/field.ts:27
Whether .default() gave it a value.
optionalmax?:number
Defined in: packages/schema/src/field.ts:52
The greatest value, or for text the longest length (.max()).
optionalmin?:number
Defined in: packages/schema/src/field.ts:50
The least value, or for text the shortest length (.min()).
nullable
Section titled “nullable”nullable:
boolean
Defined in: packages/schema/src/field.ts:17
Whether the value may be null (.optional()).
precision?
Section titled “precision?”
optionalprecision?:number
Defined in: packages/schema/src/field.ts:46
A decimal’s number of digits (f.decimal()).
readOnly
Section titled “readOnly”readOnly:
boolean
Defined in: packages/schema/src/field.ts:19
Whether the API never writes it (.readOnly()).
regex?
Section titled “regex?”
optionalregex?:object
Defined in: packages/schema/src/field.ts:54
A pattern the text must match (.regex()).
message
Section titled “message”message:
string
The message of the issue a value that does not match gets.
re:
RegExp
The pattern.
relation?
Section titled “relation?”
optionalrelation?:object
Defined in: packages/schema/src/field.ts:39
A relation’s resource and the columns that hold its key (f.relation(), .columns()).
columns?
Section titled “columns?”
optionalcolumns?:string[]
The columns holding the other record’s key, in the order of that key; the field’s own column when omitted.
resource
Section titled “resource”resource:
string
The resource it points at.
scale?
Section titled “scale?”
optionalscale?:number
Defined in: packages/schema/src/field.ts:48
A decimal’s number of digits after the point (f.decimal()).
sensitive?
Section titled “sensitive?”
optionalsensitive?:boolean
Defined in: packages/schema/src/field.ts:35
Whether it is hidden like a password (.sensitive()).
sortable
Section titled “sortable”sortable:
boolean
Defined in: packages/schema/src/field.ts:23
Whether sorts may use it (.sortable()).
type:
FieldType
Defined in: packages/schema/src/field.ts:13
The field’s type.