Data Types

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.

Admin

This data type stores and handles the platform's commission in %. The admin can set the commission from the admin page.
It has just one field:
  • commision - number - This field determines the commission set by the admin which is applied to every transaction on the platform
💡
Note: The data type has a privacy rule applied. See the 💬 in the database under the privacy section for details.

Answer

This data type is used to store the product listing's FAQ section answers. It comes with fields listed below:
  • Answer Text - text - This field stores the text message body of the answer.
  • Product - Product - This field is the Product associated with the Answer.
  • Question - Question - This field is the Question the answer was written for.

Chat

This data type is used for conversation between two users and stores related information.
It has just two fields:
  • chatMessages - List of Messages - This field stores a list of messages unique IDs related to this chat.
  • Users - List of Users - This field stores a list of participants (users) in this chat.

Message

This data type is used to store the message in Chat between users.
It comes with fields listed below:
  • Chat - Chat - This field is the Chat a message is associated with.
  • messageContent - text - This field stores the text body of this Message.
  • messageNew - yes / no - This field determines whether a message is new and not seen by the respondent (Default value is set to no).

Notification

This data type is used to store information about notifications created on the platform.
It comes with the following fields:
  • Message - text - This field stores the text body of this notification.
  • Read - yes / no - This field determines if this notification has been seen or not.
  • Recipient - User - This field handles the recipient User of this notification.
  • Related Order - Order - This is the Order a notification is related to.

Order

This data type is used to handle platform orders and store related data about orders.
It comes with the following fields:
  • Approved - yes / no - This field specifies if this order has been approved.
  • Buyer - User - This field stores the buyer of this order.
  • Cancel Requested - yes / no - This field specifies if a cancel request was asked for this order.
  • Canceled - yes / no - This field specifies if this order has been canceled.
  • platformcharge - number - This field stores the platform's amount of money charged for the order.
  • Product - Product - This field stores the product related to this order.
  • Rejected - yes / no - This field specifies if this order has been rejected.
  • Seller - User - This field stores the seller of this order.
  • Sent For Approval - yes / no - This field handles the order status if it has been sent for approval.
  • Total - number - This field stores the total of this order.

Product

This data type is used to store information about products listed on the platform.
It comes with the following fields:
  • Category - text - This field stores the category for the product.
  • Description - text - This field stores the description of this product.
  • Image - image - This field stores an image associated with the product.
  • Name - text - This field stores this product's name.
  • Price - number - This field stores this product's price.
  • productQuestion - List of Questions - This field stores list of questions related to product listing.
  • Published - yes / no - This field determines whether the product was published or not on the platform (Default value is set to no).
  • Rating - List of numbers - This field stores a list of ratings this product has received.
  • Sales - number - This field keeps the information about how many sales this product has.
  • Visible - yes / no - This field determines whether the product is visible to customers (Default value is set to no).

Question

This data type is used to store the product listing's FAQ section questions. It comes with fields listed below:
  • Product - Product - This field stores the product to which this question is related.
  • Question Text - text - This field stores the text body of this question.
  • questionAnswer - Answer - This field stores the answer associated to the question.

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.
It comes with fields listed below:
  • boughtProducts - List of Products - This field stores a list of products the user has bought.
  • Date Of Birth - date - This field stores this user's date of birth.
  • DemoAdmin - yes / no - This field handles demo user type. When the field value is yes the delete/edit actions are locked on the admin page.
  • Description - text - This field stores the text description of the user.
  • First Name - text - This field stores user's first name.
  • Last Name - text - This field stores user's last name.
  • Location - text - This field stores the user's address.
  • Public Profile Image - image - This field stores a user profile picture (It comes with a default image value).
  • Public Username - text - This field stores the username of the user.
  • userAdmin - yes / no - This field attributes admin rights to the user when the field value is yes (Default value is set to no).
  • userChats - List of Chats - This field stores a list of chats this user is a part of.
  • userProducts - List of Products - This field stores a list of products listed by this user.
  • Vendor - yes / no - This field specifies if this user is a seller (Default value is set to no).
  • wishList - List of Products - This field stores a list of products wishlisted by this user.
💡
Note: The data type has a privacy rule applied. See the 💬 in the database under the privacy section for details.

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 through the modification process.
In order to preview a Note of any data type or field, click on the 💬 icon.
Image without caption