This section consists of Database Things and fields description for every thing which is part of the template.

Introduction

To get to the Data section, click the database icon on the left side tabs in Bubble Editor.
Important: See Bubble manual information when working with data: https://manual.bubble.io/help-guides/working-with-data; https://manual.bubble.io/core-resources/data.

Data Types

Note: In case you have accidentally deleted a data type - no worries! Bubble lets you restore💪the deleted data type. Clicking on 'show deleted types' or 'show deleted fields' from the Data → Data types tab will reveal the deleted items, and a 'restore' button will appear next to each deleted entry. Simply click 'restore', to restore a field or data type.
💡
Tip: Aside from the below-listed data types and fields, Bubble creates these default fields visible in each data type: Creator, Modified Date, Created Date and Slug, except for the User data type. The User data type will have the following fields: email, Modified Date, Created Date and Slug. These fields' values can be used in workflows, conditional formatting, etc. To learn more, see the Bubble manual.

Activity

A user's specialty falls under a certain category. The categories are stored within the Activity datatype.
It has just two fields:
Field Name
Type
Notes
activityname
text
The name for this activity.
icon
image
The icon related to this activity.

Booking

Users (students) can book a listing (meaning book an appointment) and pay for that particular listing. This data type handles the essential part of the booking process.
It comes with the fields listed below:
Field Name
Type
Notes
Available
yes / no
Specifies if this booking is available.
Booked
yes / no
Specifies if this booking is booked (Default value is set to no).
canceledbyinstructor
yes / no
Specifies if this booking was canceled by the instructor.
canceledbylearner
yes / no
Specifies if this booking was canceled by the learner.
chargeapproved
yes / no
Specifies if the payment for this booking was approved.
Client
User
Specifies who is the user who booked the listing.
deniedbyinstructor
yes / no
Specifies if the booking was denied by the instructor (Default value is set to no).
Instructor
User
Specifies the instructor that is related to this booking.
Listing
Listing
Specifies the listing that is related to this booking.
Payment transaction
Transactions
Stores the payment transaction for this booking.
paymentauthorized
yes / no
Specifies if the payment for this booking is authorized.
paymentdone
yes / no
Specifies if the payment for this booking was done.
pending confirmation
yes / no
Specifies if the confirmation for the booking is pending.
scheduledchargedate
date
Specifies the date when the payment for the booking is scheduled.
Time slot
date range
Contains a date range related to this booking.

Calendar

When making a booking, a user can select the start and end date for the appointment from a calendar view. The set date is handled within this data type.
It comes with fields listed below:
Field Name
Type
Notes
Available?
yes / no
Specifies if this calendar is available (Default value is set to yes).
Booking
Booking
Stores the bookings related to this object.
Headline
text
Contains the headline of this calendar.
timeslot
date range
Contains a date range for this calendar.

Cancelation Policy

In case a user wants to cancel an already booked appointment, there is a policy that specifies the refund amount the user will get. The Cancelation Policy data type is used for this process.
It comes with the fields listed below:
Field Name
Type
Notes
Description
text
Contains the description for this policy.
Duration
number
Specifies when this policy is being applied.
Policy type
text
Stores the type of the policy.
Refund percentage
number
Specifies the refund percentage.

Conversation

When users exchange messages, this data type holds their history for all the conversations.
It has just two fields:
Field Name
Type
Notes
Message list
List of Messages
A list of messages related to this conversation.
users
List of Users
A list of users that participate in this conversation.

Listing

An instructor user can list services offered (post a listing). All the details about the listing are stored in the listing data type.
It comes with the fields listed below:
Field Name
Type
Notes
bookings
List of bookings
Contains a list of bookings that are related to this listing.
Cancellation Policy
Cancellation Policy
Stores the specific cancellation policy for this listing.
Class
yes / no
Specifies if this is a group listing.
Class Date
date
The date when the group booking will take place.
Class Hours
number
Specifies the duration of a group booking.
Class Students
numeric range
Stores a range of how many students can attend the class.
cover
image
The cover image for this listing.
Description
text
The description for this listing.
Headline
text
The headline for this listing.
Location
geographic address
The location for this listing.
Longterm
yes / no
Specifies if it's a long-term listing.
PaymentsAvailable
yes / no
Specifies if payments are available.
Price
number
Stores the price for the listing.
Rating
number
Stores the rating of the listing.
Review rating
number
Stores the rating of the listing based on reviews.
Reviews
List of Reviews
A list of reviews that are related to this listing.
Short Description
text
Stores a short summary of this listing.
Specialism
List of texts
A list of tags related to this listing.
subject
List of Activitys
List of activity objects related to this listing.
user
User
Specifies the user that created this listing.
Verified
yes / no
Specifies if the listing is verified.
Willingtotravel
yes / no
Specifies if the listing creator is willing to travel.
💡
Tip: When booking a listing, the user (student) will be asked to choose a time slot for the appointment. If the booking made is for the current date, then the nearest time slot available will be in 2 hours from the current time. When a booking is made, its timeslot will be locked and is not available for new bookings unless the booking will be canceled, either by the instructor or the student.
Note: The data type has a privacy rule applied. See the 💬 in the database under the Privacy section for details.

Location

The Location data type stores the geographic address for the listing. It comes with only one custom field:
Field Name
Type
Notes
location
geographic address
The full geographical address of this location.

Messages

This data type is used to handle the messages during users’ conversations.
It comes with the fields listed below:
Field Name
Type
Notes
conversation
Conversation
The conversation related to this message.
Message body
text
The text content of this message.
new
yes / no
Specifies if the message is new.

NotificationObj

The data type NotificationObj contains fields that store notification messages. There a few triggers for notification messages: when the user requests booking a class from the listing author, when a booking session is confirmed or declined (for both parties), etc.
It comes with the fields listed below:
Field Name
Type
Notes
body
text
Stores the text content of the notification.
important
yes / no
Defines how important this notification is. This will just affect the color of the notification where it is displayed.
new
yes / no
Specifies if the notification is new.
Recipient
User
Stores the recipient user of this notification.

Popular Locations

The popular locations contain information about places set by the admin to be displayed on the index page.
It comes with fields listed below:
Field Name
Type
Notes
City
text
Stores the city for this location.
fullLocationAddress
geographic address
Stores the full geographical address.
Image
image
The image related to this location.
State
text
The state for this location.

Review

Users (students) can leave reviews on the services they were provided (listings) and this data type handles them.
It comes with the fields listed below:
Field Name
Type
Notes
Listing
Listing
The listing object related to this review.
Listing ID
text
The ID of the listing that is related to this review.
Rating
number
The rating for the review.
Review body
text
The text content of the review.

Testimonials

This data type handles testimonials for the platform, these are published on the index page.
It comes with the fields listed below:
Field Name
Type
Notes
block
yes / no
Specifies if the testimonial is blocked.
Job title
text
Stores the job title of the user related to the testimonial.
Name
text
Stores the name of the user related to the testimonial.
Photo
image
Stores the image of the user related to the testimonial.
Text
text
Stores the text content of the testimonial.

Transactions

Transactions happen when a listing posted by an Instructor is booked by a user (student) and a fee is paid for the service. The transactions data type takes fields that are necessary for a transaction.
It comes with fields listed below:
Field Name
Type
Notes
Amount
number
Stores the total amount of this transaction.
Booking
Booking
Specifies the booking to which this transaction is related.
Instructor
User
Stores the instructor user that created the listing.
Learner
User
Stores the learner user that paid for the booking.
Listing
Listing
Specifies the listing to which this transaction is related.
platformFee
number
Stores the fee that is taken by the platform.
Refund
yes / no
Specifies if the transaction was refunded.
stripe transaction id
text
Stores the stripe charge ID of the transaction.
stripeComission
number
Stores the fee that is taken by stripe.

User

Bubble applications have a built-in User data type that acts like any type that is created in the database. For instance, you can modify a user, delete a user, list them in a repeating group, etc. To learn more, see Bubble manual.
It comes with fields listed below:
Field Name
Type
Notes
admin
yes / no
Specifies if the user is an admin.
block
yes / no
Specifies if the user is blocked.
Note: The data type has a privacy rule applied. See the 💬 in the database under the Privacy section for details.

Option Sets

💡
Tip: Option sets define a static list of choices for use in dropdowns, pop-ups, etc. Options inside the sets have at least a text display, but they can have additional attributes defined in the Data tab. To learn more, see Bubble Manual.
Below you can find the list of option set attributes and options.

Notifications

The options set is used to store icons for each of the notification types. It comes with one field:
Attribute
Type
Notes
icon
image
Stores the icon for the notification.
The options for this set are:
Option
Types
email
Message notification type.
app
Message notification type.
email & app
Message notification type.
Tip: To find the pages where the options sets are used, use the App Search Tool within the editor.
Image without caption

Embedded Notes in Bubble Editor

This template comes with explicit Notes for Database fields, Option sets and their fields, and Privacy rules, which will guide you with the modification process.
In order to preview a Note of any data type or field, click on the 💬 icon.
Image without caption