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.
⚠️
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.

Account

Account data type contains information about the linked bank account of the user for deposit/withdrawal of funds.
It comes with the following fields:
  • account_name - text - This field stores user-entered name of the account.
  • account_number - text - This filed stores generated by platform number of the account.
  • bank - Bank - This field contains Bank data type.
  • bank_code - text - This field stores code of the bank from Bank data type.
  • paystack_recipient - text - Stores recipient code information for a recipient transfer (Applicable for Paystack Initiate Transfer Action).

Bank

Bank data type contains information about banks for linking an account (bank account) to the user's profile.
💡
Tip: By default, 22 international banks are added to make it easy to start using the platform. You can add more if needed.
Image without caption
It comes with the following fields:
  • code - text - This field stores text code of the bank.
  • logo - image - This field stores bank's logo.
  • name - text - This field stores bank's name.

Config

Config data type contains basic information about the platform: logo, links to social networks, description and name of the site. All these fields are used on the Admin page -> "Settings" tab.
It comes with the following fields:
  • fb_link - text - This field stores link for Facebook.
  • logo_dark - image - This field stores dark logo image.
  • logo_white - image - This field stores white logo image.
  • site_description - text - This field stores description of the site.
  • site_name - text - This field stores name of the site.
  • twitter_link - text - This field stores link fo Twitter.

FAQ

FAQ data type contains info on the website in a standard question-answer form.
It comes with the following fields:
  • Answer - text - This field stores answer for question for FAQ section.
  • Question - text - This field stores question for FAQ section.
💡
Tip: You can find FAQ section on the index page.

Funding

Funding data type contains information about the type and amount of funds transferred to the platform wallet (not to be confused with invested funds).
It comes with the following fields:
  • Amount - number - This field stores amount of client funds.
  • Crypto_ref - text - Stores a random string number for payment transfer using crypto.
  • FundingID - text - This field stores the unique ID of the transaction.
  • Method - text - This field stores type of transaction (i.e. crypto or via card).
  • Status - Status - This field stores current transaction status.
  • User - User - This field contains email from User.

Investment

Investment data type contains information about investments created on the platform (i.e. about those funds that bring income to the user).
It comes with the following fields:
  • amount - number - This field stores amount of investment.
  • date_active - date - This field stores date of investment creation.
  • date_ended - date - This field stores date of investment expiration.
  • id - text - This field stores the unique ID of the investment.
  • next_return_due - date - This field stores next date of investment payment.
  • payment_method - text - This field stores investment method.
  • plan - text - This field stores plan of investment.
  • return_naira - number - Stores value of ROI in fiat amount.
  • return_percentage - number - Stores value of ROI in percentage.
  • returns - List of Returns - This field contains list of returns.
  • status - text - This field stores status of investment (Default value is pending).
  • term - number - Determines period of time user holds the investment (3 or 6 Months).
  • total_returns_naira - number - Stores total value of ROI in fiat amount.
  • total_returns_percent - number - Stores total value of ROI in percentage.

Referral

Referral data type contains information about users who have registered using a referral link and the commission received by the referrer.
It comes with the following fields:
  • referred - User - This field stores referred user.
  • referrer - User - This field stores referrer user.
  • value - number - This field stores amount of referral payment.

Return

Return data type contains information about the transfers requested from the platform wallet (not to be confused with investment payments) to the user's wallet.
It comes with the following fields:
  • amount - number - This field stores amount of user return.
  • count - number - This field stores count number of user returns.
  • date - date - Stores the current date/time value of return object.
  • investment - Investment - This field contains Investment data type.

Transaction

Transaction data type contains information about transactions that were already carried out from/to the user.
It comes with the following fields:
  • type - text - This field stores type of transaction.
  • value - text - This field stores value of funds.

User

Bubble applications have a built-in User data type that acts like any type that it is created in database. For instance, you can modify a user, delete a user, list them in a repeating group, etc.
It comes with the following fields:
  • email_token - text - This is field is an email token generated when a new user is created and is used in the confirmation link. Every new user receives it in the confirmation email after registration to be able to use his account.
  • email_verified - yes / no - The field stores information about the verification of the user's email.
  • firstname - text - The field stores information about the first name of user.
  • fullname - text - The field stores information about the full name of user.
  • Fundings - List of Fundings - This field it's an object that stores information about funding (money user adds to his account and can use for investments).
  • investments - List of Investments - This field contains information about a list of investments created by this user on the platform.
  • lastname - text - The field stores information about the last name of user.
  • permission - text - The field stores information about the user's access level.
  • photo - image - The field stores the user's photo.
  • referral_code - text - The field stores the referral code of the user.
  • referrer - User - The field stores the user's referrer email.
  • referrer_code - text - The field stores the user's referrer code.
  • rewards - List of Referrals - This field stores information about referral reward for each referred user (referral).
  • signup_channel - text - The field stores information about how the user was registered.
  • total_balance - number - The field stores information about the user's total balance.
  • total_invested - number - The field stores information about the user's total investments.
  • total_returns_figure - number - The field stores information about the user's returns.
  • total_returns_percent - number - The field stores information about the user's returns as a percentage.
  • withdrawals - List of Withdrawals - The field stores information about the user's withdrawals.

Withdrawal

Withdrawal data type contains information about the funds requested by the user, obtained as a result of the investments created by this user.
It comes with the following fields:
  • account - Account - This field stores user account.
  • approved_date - date - This field stores confirmation date of withdrawal funds.
  • btc_address - text - This field stores bitcoin address.
  • btc_amount - number - This field stores amount of bitcoins for withdrawal.
  • fee - number - The field stores information about the commission on the platform for withdrawal.
  • fiat_amount - number - This field stores amount of dollars for withdrawal.
  • reference - text - Stores random string number for cryptocurrency withdrawal.
  • status - text - Determines the withdrawal status of cryptocurrency (Default text value pending).
  • wallet - cryptocurrency_wallet - This field stores user's cryptocurrency wallet.

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