Optional ReadonlyautoIf true, the key will be automatically generated if not provided. Only applies to uuids and integers
Optional ReadonlyautoIf the value should be created automatically. Used in date creation.
Optional ReadonlychoicesPossible limiting choices of what the property can be.
Optional ReadonlydataSets the type of the key.
Optional ReadonlydefaultA default value if one is never given.
Optional ReadonlydescriptionA short human readable description of the property for documentation.
Optional ReadonlyfetcherIf you are using ModelReferences, this is required. A fetcher used for getting model references. This configuration item is used within the AdvancedModelReferenceProperty and any other property that is lazy loading (atomically) models.
Optional ReadonlyisIs the property an array of values?
Optional ReadonlyisIs the property only true or false?
Optional ReadonlyisDetermines if this value needs to go through denormalization.
Optional ReadonlyisCan the property only be an integer?
Optional ReadonlyisCan the property only be a number?
Optional ReadonlyisCan the property only be a string?
Optional ReadonlylazyA lazy loading method, which will only run when the value is actually retrieved. IMPORTANT: Do not include promises as part of this because they are not thread safe.
The current value
The models current data
Optional ReadonlylazyA thread safe (Atomic) version of lazyLoadMethod. Use this for all lazy loadings that requires Promises.
The current value
The models current data.
Optional ReadonlymaxThe maximum length of the value. (Drives validation)
Optional ReadonlymaxThe maximum size of the value. (Drives validation)
Optional ReadonlyminThe minimum length of the value. (Drives validation)
Optional ReadonlyminThe minimum size of the value. (Drives validation)
Optional ReadonlyprimaryOptional: A custom primary key generator function to use for models. If the property type is UniqueId (default) then this will produce random UUID. If the property type is a number, a random number will be generated. If using a SQL-like database that uses numbers, its HIGHLY recommended to get a number from the database itself.
Optional ReadonlyrequiredIs this property required?
Optional ReadonlytypeA type override to override the property type of a property.
Optional ReadonlyvalidatorsAdditional validators for the property.
Optional ReadonlyvalueThe value of the property (if provided)
Optional ReadonlyvalueAn optional function that can select a "part" of the value to return.
Optional ReadonlyzodAn optional zod schema for this property. If provided, it will be used as an override for the generated schema.
A property that represents a key in a database. By default it is a "uuid" type, but if you want to use an arbitrary string, or an integer type you can set the
dataTypeproperty.