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.

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.

CartItem

This data type is used to add meals to the shopping cart without making changes to the actual Mealobject.
It comes with the following fields:
Field Name
Type
Notes
Meal
Meal
Stores the meal of this cartItem.
priceTotal
number
Stores the total price for this cartItem.
quantity
number
Stores the quantity for the meal of this cartItem.

Category

This data type stores the categories of the restaurants added to the platform.
It comes with the following fields:
Field Name
Type
Notes
title
text
Stores the title of this category.

Conversation

This data type represents a chat between users.
It comes with the following fields:
Field Name
Type
Notes
conversationParts
List of Users
A list of user that take part to this conversation
messages
List of Messages
Stores a list of messages related to this conversation.
💡
Tip: Only customers can start the chat conversation - restaurants can only reply.

Coupon

This data type contains information about discount coupon codes created by specific restaurants. It contains the alphanumerical code created by the restaurant that can be used by the customers to redeem it and many other parameters.
Each coupon is directly linked to a restaurant so using it when ordering food from a different restaurant won't be possible.
It comes with the following fields:
Field Name
Type
Notes
code
text
Stores the code of this coupon.
restaurant
Restaurant
Stores the restaurant to which this coupon is related.
type
CouponType
Stores the type of this coupon.
usedCount
number
Stores the number of times this coupon was used.
validPeriod
CouponPeriod
Stores the valid period of this coupon.
validUntil
date
Stores the date until this coupon will be available.
value
number
Stores the value this coupon will get off the final price of an order.
💡
Tip: Coupons can be one of two types: "Percent" and "Amount". You can add coupons on the Restaurant page in the "Settings" tab.

Meal

This data type stores information about the food item.
It comes with the following fields:
Field Name
Type
Notes
description
text
Stores a description of this meal.
discountPrice
number
Stores a discounted price of this meal.
mealMass
number
Stores the mass of this meal.
menuCategories
List of Tags
Stores a list of tags that describe this meal.
name
text
Stores the title of this meal.
picture
image
Stores a picture related to this meal.
popular
yes / no
Specifies if this meal is popular.
price
number
Stores the price of this meal.
published
yes / no
Specifies if this meal is published.
restaurant
Restaurant
Stores the restaurant related to this meal.

Message

This data type represents a message from a chat conversation between the restaurant and the customer.
It comes with the following fields:
Field Name
Type
Notes
content
text
Stores the text content of this message.
newFor
List of Users
Stores a list of user for which this message will be new.
picture
image
Stores an image attached to this message.

NotificationObj

This data type is used to store information about notifications created on the platform.
It comes with the following fields:
Field Name
Type
Notes
newFor
List of Users
Stores a list of user to which this notification will be new.
notificationSetType
Notifications
Stores the type of notification.
order
Order
Stores an order related to this notification.
recipients
List of Users
Stores a list of users that will receive this notification.

Order

This data type stores information about orders created on the platform.
It comes with the following fields:
Field Name
Type
Notes
AdditionalInformation
text
Stores additional information left by the customer.
addressApartment
text
Stores the apartment number of the address for this order.
addressCity
text
Stores the city of the address for this order.
addressEntrance
text
Stores the building entrance of the address for this order.
addressFloor
text
Stores the floor of the address for this order.
addressHouse
text
Stores the house number of the address for this order.
addressLine1
text
Stores the line 1 of the address for this order.
appFeeAmount
number
Stores the app fee amount that will be taken by the platform.
cartItems
List of CartItems
Stores a list of meal items that were added to this order.
Coupon
Coupon
Stores the coupon used at checkout for this order.
courier
User
Stores the courier that will deliver this order.
courierAmount
number
Stores the payment amount that will be taken by the courier.
couriersWhoDeclineOrder
List of Users
Stores a list of couriers that declined delivery for this order.
currentStatus
Status
Stores the status of this order.
customerPhone
text
Stores the phone of the customer that created this order.
dropoffAddress
geographic address
Stores the drop off geographical address of this order.
orderID
text
Stores a custom ID of this order that is displayed on the platform.
orderTotalAmount
number
Stores the total payment amount for this order.
PaymentID
text
Stores the ID of the stripe payment for this order.
restaurant
Restaurant
Stores the restaurant from which the meals of this order were ordered.
restaurantTotalAmount
number
Stores the total payment amount that will be received by the restaurant.
Reviewed
yes / no
Specifies if this order was reviewed by the customer.
💡
Tip: An order is created after the customer pays for the meals added to his cart.

Request

This data type stores information collected from the courier's and restaurant's onboarding. All the information is stored in an object of this data type and is sent to the admin for confirmation.
Upon confirmation, a courier or restaurant object will be created (depending on the type of the request) and the users that created those requests will receive credentials via emails specified, to log in to their accounts.
It comes with the following fields:
Field Name
Type
Notes
category
Category
Stores the category of the restaurant for this request.
courierAge
number
Stores the age of the courier for this request.
driverLicenceNumber
text
Stores the driver license number of the courier for this request.
driverLicencePicture
image
Stores a driver license's picture of the courier for this request.
drivingExperience
number
Stores the driving experience of the courier for this request.
email
text
Stores an email for this request.
firstName
text
Stores the first name of the courier for this request.
lastName
text
Stores the last name of the courier for this request.
location
geographic address
Stores the geographic location of the courier/restaurant for this request.
phone
text
Stores a phone number.
picture
image
Stores a picture of the courier/restaurant for this request.
requestType
RequestType
Stores the type of this request. There are 2 types of requests: Courier and Restaurant.
restaurantDescription
text
Stores the description of the restaurant for this request.
restaurantTitle
text
Stores the name of the restaurant for this request.
siteLink
text
Stores a link to a website of the restaurant related to this request.
status
RequestStatus
Specifies the status of this request.
tag
List of Tags
Stores a list of tags of the restaurant related to this request.

Restaurant

This data type contains all the details about a restaurant object.It comes with the following fields:
Field Name
Type
Notes
approved
yes / no
Specifies if this restaurant was approved by the platform.
Category
Category
Stores the category of this restaurant.
description
text
Stores the category of this restaurant.
firstPhone
text
Stores a phone number of this restaurant.
linkToSite
text
Stores a link that leads to this restaurant's website.
location
geographic address
Stores geographic location of this restaurant.
menuItems
List of Meals
Stores a list of meals that are available in this restaurant.
menuTags
List of Tags
Stores a list of tags related to the menu available in this restaurant.
numberOfdiscounts
number
Stores the total number of meals that have discounts in this restaurant. Used for sorting.
open/close
List of ScheduleDays
Stores the weekly schedule of this restaurant.
Orders
List of Orders
Stores a list of orders related to this restaurant.
ordersNumber
number
Stores the total number of orders. Used for sorting.
owner
User
Stores the owner of this restaurant.
picture
image
Stores the profile picture of this restaurant.
ratingNumber
number
Stores the rating of this restaurant based on reviews.
restaurantEmail
text
Stores the email of this restaurant.
restaurantName
text
Stores the name of this restaurant.
Reviews
List of Reviews
Stores a list of reviews related to this restaurant.
secondPhone
text
Stores a phone number of this restaurant.
StripeEnabled
yes / no
Specifies if this restaurant has linked a stripe account.
Tags
List of Tags
Stores a list of tags related to this restaurant.
Time12HourFormat
yes / no
Specifies what type of time format this restaurant uses.

Review

A Review can be created by a customer after completing his/her order. It stores Rating from 0 to 5.
It comes with the following fields:
Field Name
Type
Notes
Content
text
Stores the text content of this review.
Rating
number
Stores the rating of this review.
Receiver
Restaurant
Stores the receiver of this review.
Reviewer
User
Stores the user that left this review.

ScheduleDays

This data type stores data about the restaurant's work schedule for each day of the week.
It comes with the following fields:
Field Name
Type
Notes
restaurant
Restaurant
Stores the restaurant to which this schedule is related.
timeClose
Time
Stores the time the restaurant closes on this day of the week.
timeOpen
Time
Stores the time the restaurant opens on this day of the week.
weekDay
WeekDay
Stores the day of the week for which this schedule was created.

SupportTicket

This data type stores data about support tickets (questions or messages) submitted by users to the platform.
It comes with the following fields:
Field Name
Type
Notes
closed
yes / no
Specifies if the ticket complete or not
content
text
Stores the text message of the ticket.
email
text
Stores the email of this ticket's sender.
phone
text
Stores the phone of this ticket's sender.
reply
text
Stores the admin's reply for this ticket.
subject
text
Stores the subject of this ticket.
user_name
text
Stores the username of this ticket's sender.
💡
Tip: Any type of user can submit a ticket either from their dashboard or from the footer.

Tag

This data type contains all the available restaurant tags on the platform.
It comes with the following fields:
Field Name
Type
Notes
menuTag
yes / no
Specifies if this tag is related to the restaurant menu.
title
text
Stores the title of this tag.
You can add new tags. To find out more, read about adding new tags.
💡
Tip: Some of them are boolean type, marked menuTag field yes/no.

Time

This data type stores information about time. It comes with the following fields:
Field Name
Type
Notes
am_pm
text
Stores the 12 hour type of this Time object. It can be either AM or PM.
timeEuro
number
Stores the actual time in a 24 hour format.
timeUsa
number
Stores the actual time in a 12 hour format.
💡
Tip: It stores the business hours of the restaurant either in 12 or 24-hour time format.

User

This data type contains information about the users on the platform. It mainly contains information about customers and couriers, as the restaurant details.
It comes with the following fields:
Field Name
Type
Notes
addressApartment
text
Stores the customer's apartment number.
addressCity
text
Stores the customer's city.
addressEntrance
text
Stores the customer's entrance of the building.
addressFloor
text
Stores the customer's floor.
addressHouse
text
Stores the customer's house number.
addressLine1
text
Stores the customer's address line 1.
Cart
List of CartItems
Stores the items added to cart by the customer.
categoryStripeReminder
yes / no
Stores the category stripe reminder.
conversations
List of Conversations
Stores a list of conversations related to this user.
courierAge
number
Stores the age of the courier user.
currentAddress
geographic address
Stores the user's full address in a geographic format.
driverLicenceNumber
text
Stores a photo of the courier's driver licence.
driverLicencePicture
image
Stores a photo of the courier's driver licence.
drivingExperience
number
Stores the driving experience of the courier.
FavouriteRestaurants
List of Restaurants
Stores a list of restaurant the customer has liked.
firstName
text
Stores the user's first name.
isAdmin
yes / no
Specifies if this user is an admin.
lastName
text
Stores the user's last name.
mealStripeReminder
yes / no
Stores a list of orders this customer has made.
Orders
List of Orders
Stores a list of orders this customer has made.
OwnedRestaurant
Restaurant
Stores the restaurant this user owns.
phoneNumber
text
Stores this user's phone number.
profilePhoto
image
Stores the user's profile picture.
PushNotifications
yes / no
Specifies if this user has push notifications enabled.
restaurantName
text
Stores the name of the restaurant this user owns.
TemporaryCoupon
Coupon
Stores the coupon that was applied to the current cart of the user.
userType
UserType
Stores the type of this user, one of Courier, Restaurant or Customer.
💡
Tip: The categoryStripeReminder and mealStripeReminder fields are only needed to remind you to connect your Stripe account.
Image without caption
This reminder appears only once.
Image without caption
Note: The data type has privacy rule applied. See the 💬 in database under Privacy section for details.

Variables & Settings

This data type consists of parameters used to speed up the work of different workflows and elements.
It comes with the following fields:
Field Name
Type
Notes
accessRights
yes / no
This field determines demo user permissions.
appFeePercent
number
Stores the application fee of the platform. The available range of values is from 0.1 to 1 where 0.1 is for 10% and 1 is for 100%.
ContactEmail
text
Stores the contact email of the platform.
courierFeeFixed
number
Stores the courier fee for the platform.
CourierRadius
number
Stores the radius, in kilometers, of activity of couriers.
CustomerRadius
number
Stores the radius, in kilometers, of restaurants that are available for customers.
googleDirectionApi
text
Stores a google Api key used for showing the delivery routes for couriers.
UsedRestaurantTags
List of Tags
A list of restaurant tags that are being used and shown to customers on the search page.
Note: The data type has privacy rule applied. See the 💬 in database under Privacy section for details.

Embedded Notes in Bubble Editor

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