An Object Schema is the central definition of a system business entity.
An object schema defines:
Based on Object Schemas, the framework automatically generates:
| Property | Type | Description |
| title | string | Name. Used as documentation for developers. |
| table | string | The database table associated with the schema. |
| is_trash | boolean | Whether soft deletion is enabled. Uses the `is_active` field in the database. |
| properties * | array | Object properties. |
Each object is typically associated with a single database table defined by a DB Schema.
The DB Schema is responsible for the physical storage of data.
The Object Schema defines the business logic for working with that data.
| Property | Type | Description |
| title * | string | Name. |
| article * | string | Unique identifier. |
| data_type * | string | Data type accepted by the API. |
| field_type * | string | Field type used in the administrative interface. |
| size | integer | Field width (from 1 to 4). |
| is_unique | boolean | Whether the value must be unique. |
| is_autofill | boolean | Auto-fill. Determines whether the property is automatically passed to standard action scripts. |
| is_default_in_list | boolean | Whether the property is displayed in list views. |
| use_in_actions | array | Actions in which the property is available. The field is ignored in all other actions. |
| require_in_actions | array | Actions for which the property is required. |
| required_permissions | array | Permission identifiers required to access the property. |
| settings | object | Additional field settings (depend on the `field_type`). |
The `email` field is available only in the `add` and `update` actions. It is ignored in all other actions.
{
"article": "email",
"data_type": "email",
"field_type": "email",
"is_unique": true,
"use_in_actions": [
"add",
"update"
]
}
The `email` field is required when creating a record but optional when updating one.
{
"article": "email",
"data_type": "email",
"field_type": "email",
"is_unique": true,
"use_in_actions": [
"add",
"update"
],
"require_in_actions": [
"add"
]
}
A user without the `employees_salary` permission cannot:
{
"article": "salary",
"data_type": "float",
"field_type": "price",
"required_permissions": [
"employees_salary"
]
}
| Type | Description |
| integer | Integer |
| float | Floating-point number |
| string | String |
| password | Password |
| phone | Phone number |
| Email address | |
| datetime | Date and time |
| date | Date |
| time | Time |
| array | Array |
| Type | Description |
| string | Text field |
| textarea | Multi-line text area |
| editor | Rich text editor |
| Email field | |
| password | Password field |
| integer | Integer field |
| float | Floating-point field |
| price | Price |
| phone | Phone number |
| list | Dropdown list |
| multiply_list | Multi-select list |
| datetime | Date and time |
| date | Date |
| time | Time |
| year | Year |
| layout | Template (HTML layout) |
| checkbox | Checkboxes |
| image | Image |
A list can be populated in two ways:
Settings:
| Property | Type | Description |
| donor_table | string | Donor table from which records are retrieved. |
| donor_property_title | string | Property of the donor table used as the display title. |
| is_search | boolean | Whether search is used to retrieve values. |
| custom_list | array | Custom list. |
| Property | Type | Description |
| title * | string | List item title. |
| value * | string | List item value. |
| color | string | List item colour. |
| Property | Type | Description |
| donor_table * | string | Donor table from which records are retrieved. |
| donor_property_title * | string | Property of the donor table used as the display title. |
| connection_table * | string | Junction table. |
| connection_donor_property * | string | Junction table property linked to the recipient property. |
| connection_recipient_property * | string | Junction table property linked to the donor property. |
| is_search | boolean | Whether search is used to retrieve values. |
{
"title": "Clients",
"table": "clients",
"is_trash": true,
"properties": [
{
"title": "First name",
"article": "first_name",
"data_type": "string",
"field_type": "string",
"is_default_in_list": true,
"is_unique": false,
"is_autofill": true,
"required_permissions": [],
"use_in_actions": ["add", "update"],
"require_in_actions": ["add"]
},
{
"title": "Last name",
"article": "last_name",
"data_type": "string",
"field_type": "string",
"is_default_in_list": true,
"is_unique": false,
"is_autofill": true,
"required_permissions": [],
"use_in_actions": ["add", "update"],
"require_in_actions": []
},
{
"title": "Patronymic",
"article": "patronymic",
"data_type": "string",
"field_type": "string",
"is_default_in_list": false,
"is_unique": false,
"is_autofill": true,
"required_permissions": [],
"use_in_actions": ["add", "update"],
"require_in_actions": []
},
{
"title": "Email",
"article": "email",
"data_type": "email",
"field_type": "email",
"is_default_in_list": false,
"is_unique": true,
"is_autofill": true,
"required_permissions": [],
"use_in_actions": ["add", "update"],
"require_in_actions": []
},
{
"title": "Phone",
"article": "phone",
"data_type": "phone",
"field_type": "phone",
"is_default_in_list": false,
"is_unique": true,
"is_autofill": true,
"required_permissions": [],
"use_in_actions": ["add", "update"],
"require_in_actions": []
}
]
}