on GitHub" data-tooltip-id=":R1blcldtb:">v2.5.1·Edited Oct 21·
In this chapter, you’ll learn how to configure data model properties.
Use the default
method on a property's definition to specify the default value of a property.
For example:
In this example, you set the default value of the color
enum property to black
, and that of the age
number property to 0
.
Use the nullable
method to indicate that a property’s value can be null
.
For example:
The unique
method indicates that a property’s value must be unique in the database through a unique index.
For example:
In this example, multiple users can’t have the same email.