After reading this article you’ll know:
How to add and set new properties in the data model
What are quick properties and how to work with them
How to edit and delete properties
Each model contains a number of properties. Properties are attributes ascribed to a model and are assigned as data types: a number, text, price, image, file types, etc. When you create a new model, the default properties are assigned to it: ‘Created at’, ‘Updated at’, and ‘Id’. These initial properties provide unique identifiers. In this article, you will learn how to create additional properties for your data model and change their settings.
Adding properties
Go to the data model section (1), then either choose the model you will be working on (2) from the quick sidebar menu, or pick up one from the models list overview (3). |
Next, you have to decide which properties you need to add to your model. In our case, since it’s a webuser model, it could have the next properties:
|
In this example, we will add a few properties and you’ll notice that some of them require validations: the first name and password property are required, and the email address has to be both unique and required, etc. |
|
Using quick properties
Using the |
|
Editing and deleting properties
You can come back to any of the properties anytime to edit its settings. Let’s say, you forgot to mark some property as required or want to set its maximum length (if it’s a text property). To do this, just click on the property you want to change, and in the menu on the right, edit its settings. Click the |
In order to delete a property, click on it to choose one. Then in the side menu, find the delete button and click it. |