**Mazaj DB**
* countries
en_name, ar_name, flag, currency, status, phone_key, phone_validation_regex
* cities
country_id, en_name, ar_name, status, time_zone
===
* categories
en_name, ar_name, icon, cover_photo, theme_color, status, parent_id, tree, depth, lft, rgt
* merchants
en_name, ar_name, icon, cover_photo, theme_color, highlight_theme_color status, main_category(**)
* merchant_categories
merchant_id, category_id, sort
* merchant_branch
merchant_id, city_id, status, address, lat_long, minimum_order_value, fixed_delivery_fees,
===
* merchant_offers
merchant_branch_id, offer_type(delivery, offer), discount(amount, percentage, free), minimum_order_value, date_from, date_to, status, is_subscription
* subscription_plan
merchant_branch_id, days_from, days_to, offer_id
* subscription_customers
customer_id, plan_id
===
* products
merchant_id, en_name, ar_name, en_breif, ar_breif, photo, measruing_unit(one, kilo, package,...), price_per_unit, product_type(simple,bundle_main, bundle_sub..), suitable_for_how_many
* product_bundles
main_product_id, sub_product_id, available_count(two sandwiches, one pepsi)
* product_available_options(size with icons, addons, ...)
product_id, en_name, ar_name, image, status, sort, display_type, is_mandatory, select_only_one, is_override_price(repla add toce price, price)
* product_available_options_features(small, large,..)
option_id, en_name, ar_name, image, price, sort
* product_available_contents(cookies dark chocolate, cookies white chocolate, ...)
product_id, en_name, ar_name, image, status, max_quantity, min_quantity, sort
* product_available_contents_features(5 cookies dark chocolate, 8 cookies white chocolate)
content_id, en_name, ar_name, image, measruing_unit, price_per_unit
===
* customers
phone, email, name, status, password
* customer_devices
customer_id, token, device_id, status, last_login
* customer_locations
customer_id, city_id, title, address, lat, long, is_selected, type
===
===
subscription_order
```
{
"customer_id": "1",
"plan_id": "1",
"time": "14:00",
"original_total": 1200,
"order_vat": 50,
"delivery_vat": 20,
"discount": 200,
"final_total": 1000,
"days": [
{
"date": "01/05/2021",
"status": 1, // pending
"note": "Note"
},
{
"date": "02/05/2021",
"status": 0, //pending
"note": "Note"
},
{
"date": "03/05/2021",
"status": 0,
"note": "Note"
},
{
"date": "04/05/2021",
"status": 0,
"note": "Note"
},
{
"date": "05/05/2021",
"status": 0,
"note": "Note"
},
],
"subscription_type": "prepaid",
"order_details": {
"products": [
{
"product_id": 1,
"product_name": "Coffee",
"options": [
{
"option_id": 1,
"feature_id": 1
},
{
"option_id": 2,
"feature_id": 5
}
],
"contents": [
{
"content_id": 1,
"features": [
{
"feature_id": 1,
"quantity": 2
},
{
"feature_id": 1,
"quantity": 2
},
{
"feature_id": 1,
"quantity": 2
},
{
"feature_id": 1,
"quantity": 2
},
{
"feature_id": 1,
"quantity": 2
}
]
}
]
},
]
}
}
```