> For the complete documentation index, see [llms.txt](https://docs.airdev.co/events-platform-template/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.airdev.co/events-platform-template/general-information/data-structure.md).

# Data Structure

The database structure for the template

All objects and some selected fields in the template are explained below. Please refer to our [Bubble Best Practices](https://docs.airdev.co/bubble-development-guide/steps/plan/database-structure) document for guidance on how the Bubble database should be structured.

{% hint style="warning" %}
All data types and a few select fields are explained below. A good general rule to follow is that you shouldn't delete any fields that are included with the template and instead only add new ones.
{% endhint %}

## Block entry

This data type is used to store content that goes into each homepage block. Each homepage block (template) will have a maximum number of block entries:

* Testimonials section: Multiple entries
* Featured section: Up to 3 entries
* Process section: Up to 3 entries
* Slideshow section: Between 3 to 5 entries
* Capabilities section: Up to 9 entries
* Video section: 1 entry
* Press section: Between 3 to 5 entries
* About section: 1 entry
* Call-to-action section: 1 entry
* Contact section: 0 entries

## Booking

This data type represents a single instance of a user RSVPing for another user’s `Event`. A `Booking` is created when a user selects the “RSVP” option on an `Event`’s details page. This data type currently has no functional purpose for this template. It has been provided so that developers may use when adding new features or functionality to the application.

| Field name  | Type  | Description                                                                   |
| ----------- | ----- | ----------------------------------------------------------------------------- |
| End time    | date  | The ending time and date for the `Event` for which this booking was created   |
| Event       | Event | The `Event` that this booking is associated with                              |
| Start time  | date  | The starting time and date for the `Event` for which this booking was created |
| Timezone ID | text  | The timezone ID for the `Event` for which this booking was created            |
| User        | User  | The `User` who created this booking by RSVPing to it’s `Event`                |

## Dummy

This data type allows you to quickly preview your page layout by it as your data source.

## Event

This data type represents a single event on the platform that users can search for, view, and RSVP for. Events can be created by a user, and can be modified or cancelled once created. This is the primary data type for this template.

| Field name            | Type               | Description                                                                                                                                                                                                                                                   |
| --------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Attendees             | User (list)        | The list of `Users` who have RSVP’d for this event. This amount of `Users` should be equivalent to the amount of `Bookings` created for this event                                                                                                            |
| Cancelled?            | yes / no           | Indicates whether this event has been cancelled by the event creator or an app admin. Cancelled events cannot be RSVP’d for, are not shown on the search page, and are flagged with a visual indicator in the event details and dashboard pages               |
| Date range            | date range         | The date range for which this event spans. The date range begins at the event’s `Start time` and ends at the event’s `End time`                                                                                                                               |
| Description           | text               | The description for this event. This is shown anywhere the event is displayed                                                                                                                                                                                 |
| End time              | date               | The date and time that the event ends. This represents the end date/time inputted by the event creator, **converted** to the timezone that the event’s `Venue location` is in                                                                                 |
| Image                 | image              | The image for this event. This shown anywhere the event is displayed                                                                                                                                                                                          |
| Name                  | text               | The name of the event                                                                                                                                                                                                                                         |
| Spots remaining       | number             | The number of RSVP spots that remain for this event. This number is decremented and incremented whenever a user RSVPs or UN-RSVPs for the event. When this number is 0, users can no longer RSVP for this event                                               |
| Start time            | date               | The date and time that the event begins. This represents the start date/time inputted by the event creator, **converted** to the timezone that the event’s `Venue location` is in                                                                             |
| Timezone ID           | text               | The ID representing the timezone of this event’s location. This is pulled directly from the address the user inputs for this event’s `Venue location`. This field is referenced each time the event’s `Start time` and `End time` are displayed or referenced |
| Total sign ups        | number             | The number of users who have RSVP’d for this event. This is incremented each time a user RSVPs for this event                                                                                                                                                 |
| Total spots available | number             | This original number of available RSVP spots for this event. This field should not change after it is populated the first time when the event is initially created                                                                                            |
| Venue location        | geographic address | The geographic address of the physical location for this event. This address dictates the timezone that event dates will be displayed in                                                                                                                      |
| Venue name            | text               | The name of the venue/location for this event                                                                                                                                                                                                                 |

## Feature backlog

This data type represents each feature that an Owner has added into the Backlog section of the Owner's Portal.

## Flag

This data type is created each time a user chooses to flag (i.e., report) an event. This may or may not include a message. Only admin accounts can view flags

| Field name | Type     | Description                                                                                                                                                                       |
| ---------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Dismissed? | yes / no | Indicates whether or not this `Flag` has been reviewed by an admin. `Flags` with their `Dismissed?` field set to **yes** are not shown in the list of flags in the owner’s portal |
| Reason     | text     | The explanation for flagging the event. This is viewable only to admins in the owner’s portal. The `Reason` is included optionally                                                |
| Event      | Event    | The `Review` that the user has flagged                                                                                                                                            |

## Homepage block template

The data type is used for the homepage maker. App owners can add any number of homepage blocks / homepage sections straight from the owner's portal by starting from a homepage block template.

## Homepage block

App Owners can add an unlimited number of homepage blocks. They can control the content and settings from the Owner's Portal.

## Palette color

This data type is color palette list is referenced in the Air Color Picker plugin / element. Feel free to add more color entries for quick access when using the Air Color Picker element.

## Push token

This represents a unique token to be used with **OneSignal** for push notification integrations for wrapped mobile apps.

## User

The user data type represents each person who has an account in your application.

| Field name                            | Type     | Description                                                                              |
| ------------------------------------- | -------- | ---------------------------------------------------------------------------------------- |
| Date agreed to terms and privacy docs | date     | Date agreed to terms and privacy docs during sign up                                     |
| Inactive                              | yes / no | User is marked as inactive = yes when App owner deletes the user from the Owner's Portal |
| Last login                            | date     | Captures the last date that the user loaded any page in the app                          |
| Owner?                                | yes / no | If Owner is yes then they will have access to the Owner's Portal                         |
| Signup method                         | text     | E.g., E-mail, LinkedIn, Facebook, Twitter, or etc.                                       |

## Website

This data type includes fields for all app-wide settings. Most of the data fields are controlled by the App Owner from the Owner's portal. There should only be a single object of this data type.

| Field name       | Type                    | Description                                                                                                                                                                               |
| ---------------- | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Ask for cookies? | yes / no                | App Owner can control whether or not to ask users to accept cookies (if yes, a cookies banner will show on the homepage)                                                                  |
| Email            | text                    | Contact / support email that all emails in the application come from. Whenever a new email action is created in the application, it should refer to this field instead of being hardcoded |
| Email HTML       | text                    | Used in the [SendGrid API call for "send emails"](https://docs.airdev.co/canvas/quickstart-guide#step-2-setting-up-your-email) that generates a nicely-formatted HTML email               |
| List of blocks   | List of homepage blocks | Homepage blocks / sections                                                                                                                                                                |
| Name             | text                    | Name of your app / website. This is the field that should be referenced anywhere where the name is used (instead of hardcoded).                                                           |
| Primary color    | text                    | App and email template primary color                                                                                                                                                      |
| Usersnap off?    | yes / no                | This turns off the Usersnap tool, which AirDev uses with its clients to submit feedback and bug reports.                                                                                  |
