Data Structure
The template comes with the following database objects
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.
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
Comment
This data type represents a user-created comment for a post. A Comment
may be either a direct reply to a Post
or a reply to another Comment
.
Field name | Type | Description |
Author | User | The creator of the comment |
Likes | User (list) | This list of users who have liked the comment |
Parent comment | Comment | The |
Post | Post | The |
Text | text | The displayed text of the comment |
Dummy
This data type allows you to quickly preview your page layout by it as your data source.
Feature backlog
This data type represents each feature that an Owner has added into the Backlog section of the Owner's Portal.
Friendship
This data type represents both a connection (friendship) between exactly two users and a friend request from one user to another. A Friendship
is created when one user sends a friend request to another user from their profile page. If the recipient accepts the request, the same Friendship
instance will be used to represent the connection between those two users. The Friendship
instance may exist even if the recipient has not accepted it or acted on it.
Field name | Type | Description |
Friendship date | date | The date and time at which the recipient accepts the friend request. This will be only be populated if the request has been accepted |
Initiating user | User | The |
Status | text | The current state of the friendship or friend request. The three possible values are Pending, Accepted, and Ignored. Friend requests can be accepted while the |
Users | User (list) | The users involved in this connection / friendship. This list should contain exactly two |
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.
Interest
This data type represents an interest that can be associated with a User
. Interests are not unique per user - they can be linked to any number of Users
. Interests are created, edited, and removed by app admins from the owner’s portal.
Field name | Type | Description |
Name | text | The title of the interest |
Message
This data type represents a single message within a message thread. A Message
is created each time a user sends a message in the chat module.
Field name | Type | Description |
Attachment | file | The file that the message author has attached to the message. This is optional |
Text | text | The content of the message |
Thread | Thread | The overall message thread that this message is associated with. A |
Users | User (list) | The list of users who are involved with this message’s |
Viewed by users | User (list) | The list of users who have viewed this message in the chat module. This allows you to determine which messages are unread |
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.
Post
This data type represents a posting from a User
. Posts are shown on a user’s profile page as well as on their and other users’ feed. A Post
may contain text, an image, or both.
Field name | Type | Description |
Author | User | The creator of the post |
Comments | Comment (list) | The comments that are associated with this post |
Image | image | The displayed image of the post. This may be empty |
Likes | User (list) | The list of |
Text | text | The displayed text of the post. This may be empty |
Push token
This represents a unique token to be used with OneSignal for push notification integrations for wrapped mobile apps.
Thread
This data type represents a message thread between two users. All messages sent within this thread are linked to this thread. A Thread
is created when two users are added as friends.
Field name | Type | Description |
Inactive? | yes / no | Indicates whether the message thread is active and viewable |
Last msg sent | date | The date and time of the most recently created message for this thread |
Users | User (list) | The list of users who are involved with and have access to this thread. In this app, this field should always contain two users |
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) |
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" 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. |
Last updated