> For the complete documentation index, see [llms.txt](https://docs.accelerator-platform.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.accelerator-platform.com/start-here/dynamic-objects/object-definition.md).

# Object Definition

In Accelerator platform, objects are logical representations of data that can be stored and retrieved by a software application. Object metadata, which defines the attributes of the object, is stored in a MongoDB collection called "objects" within the organization database.

When creating an object, users can add fields to the object, defining the data types and properties of the field. In addition, users can define validation rules and business logic for each field, ensuring that the data stored in the object is accurate and consistent.

The validation rules and business logic are defined using scripts that are executed by the Accelerator platform. These scripts can check that the data being entered into the object meets specific criteria, such as ensuring that a field contains a valid email address or that a field value is within a specified range. The scripts can also perform more complex operations, such as manipulating data in one field based on the value of another field.

Overall, objects provide a flexible and powerful way to store and manage data within a software application. By defining the structure of the data and allowing for validation and business logic, objects help to ensure that the data stored in the software application is accurate, consistent, and meaningful.

Below are the list of the attributes or fields that Accelerator platform offers :

<table><thead><tr><th width="219.33333333333331">Field</th><th width="130">Data Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>_id</strong> </td><td>ObjectId</td><td>This is the unique identifier of the object.</td></tr><tr><td><strong>name</strong> </td><td>String</td><td>Every Object name is unique in an organization. It should be in the camelCase format. We can use this name to get data from the object.</td></tr><tr><td><strong>label</strong></td><td>String</td><td>This describes the object</td></tr><tr><td><strong>containsUsers</strong></td><td>Boolean</td><td>This is an optional attribute. However, if the objective is to store additional user information in an Object, then this value must be set to true. This will allow the user to create an Item in the object in which the _id will be the same as the logged-in user, thereby enforcing a one-to-one relationship between the ‘users’ collection in the auth database and the item collection of the object.</td></tr><tr><td><strong>enableVersionHistory</strong></td><td>Boolean</td><td>When this optional field is set to true, the system generates a read-only array field named '_versionHistory' and a read-only string field named '_version' within each item of the Object. The '_version' field begins with '1.0' and increments by 0.1 with each update made to the item. As a result, the previous version of the item is added to the '_versionHistory', allowing users to track the changes made to it.</td></tr><tr><td><strong>fields</strong></td><td>ObjectArray</td><td>"The 'fields' attribute is an array that contains the definitions for all the fields associated with an object. These fields have common attributes such as _id, name, label, type, and validators. The _id and name is unique within an Object. In the case of a choice field, an additional attribute called 'options' is included, which is a string array that lists all the available options. </td></tr><tr><td><strong>_createdAt</strong> </td><td>Date</td><td>This is the date and time when the object was created.</td></tr><tr><td><strong>_createdBy</strong> </td><td>String</td><td>This is the email of the user who created the object.</td></tr><tr><td><strong>_modifiedAt</strong> </td><td>Date</td><td>This is the date and time when the object was last modified.</td></tr><tr><td><strong>_modifiedBy</strong> </td><td>String</td><td>This is the email of the user who last modified the object.</td></tr><tr><td><strong>_collectionName</strong></td><td>String</td><td>This is the name of the item collection where the object data is stored. The item collection follows a specific syntax: &#x3C;first_8_characters_of_object_name>_&#x3C;object_id></td></tr></tbody></table>

Example creating a object named as DocumentApprover which contains multiple Fields in it. [Check out the list of fields here](/start-here/dynamic-objects/field-definition.md).

```json
// Example Object DocumentApprover
// It contains other users with a enableversionhistory set to true
{ 
  "name": "DocumentApprover",
  "label": "Document Approver",
  "containsUsers": true,
  "enableVersionHistory": true,
  "fields": [{field_obj}],   
}
```
