Understanding the Database
Understand the existing database, and how you can add/ remove any fields from it
We are using FireStore database in this starter. Cloud Firestore is a flexible, scalable database for mobile, web, and server development from Firebase and Google Cloud Platform. Like Firebase Realtime Database, it keeps your data in sync across client apps through realtime listeners and offers offline support for mobile and web so you can build responsive apps that work regardless of network latency or Internet connectivity. Cloud Firestore also offers seamless integration with other Firebase and Google Cloud Platform products, including Cloud Functions.
Details on connecting Ionic apps to Firebase database in our tutorial here
There will be 5 tables (collections) we are using in this starter kit:
User Table
Product Table
Category Table
Order Table
Offer Table
User Table:-
Fields in the user table
username:- holds user name for the user
phoneNumber:- holds contact number for the user
email:- holds an email address for the user
gender:- holds gender info for the user
userId:- holds unique User id for the user which is generated by Firebase
Product Table:-
Fields in product table
name :- it holds name of the Product
images : — it holds an array of image URL for the products
regularPrice :- If holds Regular Price of your order
pricePerQuantity :- It holds Your Product Quantity per Price like 1kg m 200g , if you leave blank we will take it as 1 product per price
offer :- It holds Offer on your Product in percent
description :- Product description comes here
instruction :- Delivery instruction for the product comes here
pin :- If you want to deliver your product in specific pin code place all the pincode here. if you leave it blank it will support for all Pincode
tags :- Tag related to product comes here
Like :- Best Offers, Popular Deals
categories :- it will take all category id related to the product
instock :- it is a boolean variable means if it is true then only your product shown in Instock Products Stack
free_shipping :- it is a boolean variable means if it is true then your product support Free shipping
delivery_in :- Your product will deliver in how many days will come here
cod :- it is boolean variable means if it is true then your product support Cash on delivery
Category Table :-
Fields in category table
name :- Your name for the category comes here
description :- Description for the category comes here
discount : discount related to category comes here
home_page :- it is boolean. If you set it true then only your category will show in home page
images :- Array of all image URL related to the category comes here
Offer Table:-
Fields in offer table
titles :- Title for the offer comes here
description :- Description for the offer comes here
code :- Promo-code for the offer comes here
images :- Array of all image URL related to this Offer comes here
discount :- Discount in percentage user will get after applying the promo-code will come here
Order Table:-
Fields in the order table
address :- it holds all related information of address on which this order has to deliver
created_at :- holds Created Date for the product
GrandTotal :- it is a calculation of all the money you get in this order after deduction of all the discounts
Products :- Array of the product ordered
SelectedDay :- on which day User needs this product
SelectedTime :- User’s suitable time period for receiving this order
UserId :- Holds the ID of the user who creates this order
Last updated