PF DB 1-20
Tables (46)
address_details
- id — bigint(20) — Primary key — NOT NULL
- address_id — bigint(20) — Foreign key → addresses.id — NOT NULL
- first_name — varchar(50) — NOT NULL
- last_name — varchar(50) — NOT NULL
- email — varchar(100) — NOT NULL
- phone_number — varchar(15) — NOT NULL
- method — varchar(50)
- address_line_1 — varchar(255) — NOT NULL
- address_line_2 — varchar(255)
- address_line_3 — varchar(255)
- city — varchar(255) — NOT NULL
- state — varchar(255) — NOT NULL
- zip_code — varchar(255) — NOT NULL
- country — varchar(255) — NOT NULL
- country_code — varchar(255) — NOT NULL
- created_at — timestamp
- updated_at — timestamp
addresses
- id — bigint(20) — Primary key — NOT NULL
- user_id — bigint(20) — Foreign key → users.id — NOT NULL
- type — varchar(255) — NOT NULL
- is_default — tinyint(1) — NOT NULL
- created_at — timestamp
- updated_at — timestamp
attributes
- id — bigint(20) — Primary key — NOT NULL
- attribute — varchar(255) — NOT NULL
- values — json — NOT NULL
- created_at — timestamp
- updated_at — timestamp
cart_items
- id — bigint(20) — Primary key — NOT NULL
- cart_id — bigint(20) — Foreign key → carts.id — NOT NULL
- product_id — bigint(20) — Foreign key → products.id — NOT NULL
- quantity — int(11) — NOT NULL
- status — varchar(255) — NOT NULL
- created_at — timestamp
- updated_at — timestamp
carts
- id — bigint(20) — Primary key — NOT NULL
- user_id — bigint(20) — Foreign key → users.id — NOT NULL
- coupon_id — bigint(20) — Foreign key → coupons.id
- status — varchar(255) — NOT NULL
- created_at — timestamp
- updated_at — timestamp
categories
- id — bigint(20) — Primary key — NOT NULL
- image_id — bigint(20) — Foreign key → images.id
- name — json — NOT NULL
- slug — json
- status — text — NOT NULL
- is_best_seller — tinyint(1) — NOT NULL
- is_main — tinyint(1) — NOT NULL
- meta_title — text
- og_url — text
- og_image — text
- meta_description — text
- robots — text
- canonical — text
- created_by — bigint(20) — Foreign key → users.id — NOT NULL
- updated_by — bigint(20) — Foreign key → users.id
- created_at — timestamp
- updated_at — timestamp
- deleted_at — timestamp
category_has_relations
- id — bigint(20) — Primary key — NOT NULL
- parent_id — bigint(20) — Foreign key → categories.id — NOT NULL
- child_id — bigint(20) — Foreign key → categories.id — NOT NULL
- created_at — timestamp
- updated_at — timestamp
couponables
- coupon_id — int(11) — NOT NULL
- couponable_id — int(11) — NOT NULL
- couponable_type — varchar(255) — NOT NULL
coupons
- id — bigint(20) — Primary key — NOT NULL
- name — varchar(50) — NOT NULL
- subtitle — varchar(255) — NOT NULL
- description — text — NOT NULL
- code — varchar(50) — NOT NULL
- type — varchar(255) — NOT NULL
- amount — decimal(7,2)
- amount_type — varchar(255)
- usage_limit_per_coupon — int(11) — NOT NULL
- usage_limit_per_user — int(11) — NOT NULL
- minimum_purchase — decimal(7,2)
- maximum_purchase — decimal(7,2)
- conditions — json
- rewards — json
- apply_to — json
- can_merge_with_other_coupons — tinyint(1) — NOT NULL
- redeem_reward_only_once — tinyint(1) — NOT NULL
- start_date — timestamp
- end_date — timestamp
- created_at — timestamp
- updated_at — timestamp
failed_jobs
- id — bigint(20) — Primary key — NOT NULL
- uuid — varchar(255) — NOT NULL
- connection — text — NOT NULL
- queue — text — NOT NULL
- payload — longtext — NOT NULL
- exception — longtext — NOT NULL
- failed_at — timestamp — NOT NULL
imageables
- image_id — int(11) — NOT NULL
- imageable_id — int(11) — NOT NULL
- imageable_type — varchar(255) — NOT NULL
images
- id — bigint(20) — Primary key — NOT NULL
- full_path — varchar(255) — NOT NULL
- filename — varchar(255) — NOT NULL
- type — varchar(255) — NOT NULL
- created_at — timestamp
- updated_at — timestamp
md_brands
- id — bigint(20) — Primary key — NOT NULL
- image_id — bigint(20) — Foreign key → images.id
- name — json — NOT NULL
- slug — json — NOT NULL
- description — json — NOT NULL
- status — text — NOT NULL
- photo — varchar(255)
- is_featured — tinyint(1) — NOT NULL
- created_by — bigint(20) — Foreign key → users.id
- updated_by — bigint(20) — Foreign key → users.id
- meta_title — text
- og_url — text
- og_image — text
- meta_description — text
- robots — text
- canonical — text
- created_at — timestamp
- updated_at — timestamp
- deleted_at — timestamp
md_products
- id — bigint(20) — Primary key — NOT NULL
- name — json — NOT NULL
- barcode — varchar(50) — NOT NULL
- unit_price — decimal(10,2) — NOT NULL
- shipping_fee — decimal(10,2) — NOT NULL
- cost_of_good — decimal(10,2)
- height — decimal(7,2)
- weight — decimal(7,2)
- length — decimal(7,2)
- stock — mediumint(9) — NOT NULL
- is_taxable — tinyint(1) — NOT NULL
- created_at — timestamp
- updated_at — timestamp
migrations
- id — int(10) — Primary key — NOT NULL
- migration — varchar(255) — NOT NULL
- batch — int(11) — NOT NULL
model_has_permissions
- model_id — bigint(20) — Primary key — NOT NULL
- model_type — varchar(255) — Primary key — NOT NULL
- permission_id — bigint(20) — Foreign key → permissions.id — NOT NULL
model_has_roles
- model_id — bigint(20) — Primary key — NOT NULL
- model_type — varchar(255) — Primary key — NOT NULL
- role_id — bigint(20) — Foreign key → roles.id — NOT NULL
order_details
- id — bigint(20) — Primary key — NOT NULL
- order_id — bigint(20) — Foreign key → orders.id — NOT NULL
- product_id — bigint(20) — Foreign key → products.id — NOT NULL
- shipment_option_id — int(10) — NOT NULL
- product_name — json — NOT NULL
- quantity — int(11) — NOT NULL
- supply_price — decimal(10,2) — NOT NULL
- supply_vat — decimal(10,2) — NOT NULL
- price — decimal(10,2) — NOT NULL
- vat — decimal(10,2)
- line_total — decimal(10,2) — NOT NULL
- coupon_discount — decimal(10,2) — NOT NULL
- point_discount — decimal(10,2) — NOT NULL
- line_total_discounted — decimal(10,2) — NOT NULL
- on_sale — tinyint(1) — NOT NULL
- shipment_type — tinyint(4) — NOT NULL
- pricing_type — tinyint(4) — NOT NULL
- special_type — tinyint(4) — NOT NULL
- freebie_type — tinyint(4) — NOT NULL
- is_set — tinyint(4) — NOT NULL
- is_premium — tinyint(4) — NOT NULL
- is_near_expiration — tinyint(1) — NOT NULL
- created_at — timestamp
- updated_at — timestamp
order_logs
- id — bigint(20) — Primary key — NOT NULL
- order_id — bigint(20) — Foreign key → orders.id — NOT NULL
- message — text — NOT NULL
- created_at — timestamp
- updated_at — timestamp
order_notes
- id — bigint(20) — Primary key — NOT NULL
- order_id — bigint(20) — Foreign key → orders.id — NOT NULL
- created_by — bigint(20) — Foreign key → users.id — NOT NULL
- message — text — NOT NULL
- created_at — timestamp
- updated_at — timestamp
orders
- id — bigint(20) — Primary key — NOT NULL
- customer_id — bigint(20) — Foreign key → users.id — NOT NULL
- admin_id — bigint(20) — Foreign key → users.id
- parent_id — bigint(20) — Foreign key → orders.id
- status — varchar(20) — NOT NULL
- transaction_id — varchar(20)
- transaction_method — varchar(255)
- transaction_type — varchar(255)
- post_status — varchar(255)
- refund_method — varchar(255)
- refund_type — varchar(255)
- payer_id — varchar(255)
- shipping_fee — decimal(10,2) — NOT NULL
- cross_border_shipping_fee — decimal(10,2) — NOT NULL
- us_domestic_shipping_fee — decimal(10,2) — NOT NULL
- created_at — timestamp
- updated_at — timestamp
password_resets
- email — varchar(255) — NOT NULL
- token — varchar(255) — NOT NULL
- created_at — timestamp
permissions
- id — bigint(20) — Primary key — NOT NULL
- name — varchar(255) — NOT NULL
- guard_name — varchar(255) — NOT NULL
- created_at — timestamp
- updated_at — timestamp
personal_access_tokens
- id — bigint(20) — Primary key — NOT NULL
- tokenable_type — varchar(255) — NOT NULL
- tokenable_id — bigint(20) — NOT NULL
- name — varchar(255) — NOT NULL
- token — varchar(64) — NOT NULL
- abilities — text
- last_used_at — timestamp
- created_at — timestamp
- updated_at — timestamp
product_attributes
- id — bigint(20) — Primary key — NOT NULL
- product_id — bigint(20) — Foreign key → products.id — NOT NULL
- attribute — varchar(255) — NOT NULL
- values — json — NOT NULL
- created_at — timestamp
- updated_at — timestamp
product_categories
- id — bigint(20) — Primary key — NOT NULL
- product_id — bigint(20) — Foreign key → products.id — NOT NULL
- category_id — bigint(20) — Foreign key → categories.id — NOT NULL
- is_featured — tinyint(1) — NOT NULL
- order — int(10)
- created_at — timestamp
- updated_at — timestamp
product_inventories
- id — bigint(20) — Primary key — NOT NULL
- product_id — bigint(20) — Foreign key → products.id — NOT NULL
- order_id — bigint(20) — Foreign key → orders.id
- type — varchar(255)
- created_at — timestamp
- updated_at — timestamp
product_question_answers
- id — bigint(20) — Primary key — NOT NULL
- product_question_id — bigint(20) — Foreign key → product_questions.id — NOT NULL
- answer — text — NOT NULL
- created_by — bigint(20) — Foreign key → users.id — NOT NULL
- updated_by — bigint(20) — Foreign key → users.id
- created_at — timestamp
- updated_at — timestamp
product_questions
- id — bigint(20) — Primary key — NOT NULL
- product_id — bigint(20) — Foreign key → products.id — NOT NULL
- question — text — NOT NULL
- created_by — bigint(20) — Foreign key → users.id — NOT NULL
- updated_by — bigint(20) — Foreign key → users.id
- created_at — timestamp
- updated_at — timestamp
product_reviews
- id — bigint(20) — Primary key — NOT NULL
- user_id — bigint(20) — Foreign key → users.id — NOT NULL
- product_id — bigint(20) — Foreign key → products.id — NOT NULL
- order_id — bigint(20) — Foreign key → orders.id
- rating — tinyint(4) — NOT NULL
- title — varchar(255) — NOT NULL
- review — text — NOT NULL
- status — varchar(255) — NOT NULL
- created_at — timestamp
- updated_at — timestamp
products
- id — bigint(20) — Primary key — NOT NULL
- parent_id — bigint(20) — Foreign key → products.id
- md_product_id — bigint(20) — Foreign key → md_products.id — NOT NULL
- name — json — NOT NULL
- slug — json
- description — json
- notice — json
- note — text
- sku — varchar(200) — NOT NULL
- status — varchar(60) — NOT NULL
- barcode — varchar(15) — NOT NULL
- warehouse_operation_location — varchar(10)
- on_sale — tinyint(1) — NOT NULL
- merchant_locale — tinyint(4) — NOT NULL
- shipment_type — tinyint(4) — NOT NULL
- pricing_type — tinyint(4) — NOT NULL
- special_type — tinyint(4) — NOT NULL
- freebie_type — tinyint(4) — NOT NULL
- is_set — tinyint(4) — NOT NULL
- is_premium — tinyint(4) — NOT NULL
- is_near_expiration — tinyint(1) — NOT NULL
- deduct_by — tinyint(3)
- max_purchase — mediumint(8)
- published_at — timestamp
- compare_price — decimal(8,2)
- regular_price — decimal(8,2)
- sale_price — decimal(8,2)
- sale_start — date
- sale_end — date
- premium_compare_price — decimal(8,2)
- premium_regular_price — decimal(8,2)
- premium_sale_price — decimal(8,2)
- premium_sale_start — date
- premium_sale_end — date
- new_sale_start — date
- new_sale_end — date
- meta_title — text
- og_url — text
- og_image — text
- meta_description — text
- robots — text
- canonical — text
- md_brand_id — bigint(20) — Foreign key → md_brands.id
- updated_by — bigint(20) — Foreign key → users.id
- created_at — timestamp
- updated_at — timestamp
- deleted_at — timestamp
referrals
- id — bigint(20) — Primary key — NOT NULL
- invitee_user_id — bigint(20) — Foreign key → users.id — NOT NULL
- inviter_user_id — bigint(20) — Foreign key → users.id — NOT NULL
- created_at — timestamp
- updated_at — timestamp
rewards
- id — bigint(20) — Primary key — NOT NULL
- user_id — bigint(20) — Foreign key → users.id — NOT NULL
- referral_id — bigint(20) — Foreign key → referrals.id
- order_id — bigint(20) — Foreign key → orders.id
- product_review_id — bigint(20) — Foreign key → orders.id
- redeemed_by — bigint(20)
- description — text
- amount — decimal(7,2) — NOT NULL
- type — varchar(255) — NOT NULL
- is_redeemed — tinyint(1) — NOT NULL
- expired_at — timestamp — NOT NULL
- created_at — timestamp
- updated_at — timestamp
role_has_permissions
- permission_id — bigint(20) — Foreign key → permissions.id — NOT NULL
- role_id — bigint(20) — Foreign key → roles.id — NOT NULL
roles
- id — bigint(20) — Primary key — NOT NULL
- name — varchar(255) — NOT NULL
- guard_name — varchar(255) — NOT NULL
- created_at — timestamp
- updated_at — timestamp
service_reviews
- id — bigint(20) — Primary key — NOT NULL
- user_id — bigint(20) — Foreign key → users.id — NOT NULL
- shipment_id — bigint(20) — Foreign key → shipments.id — NOT NULL
- rating — bigint(20) — NOT NULL
- review — text — NOT NULL
- created_at — timestamp
- updated_at — timestamp
sessions
- id — varchar(255) — Primary key — NOT NULL
- user_id — bigint(20)
- ip_address — varchar(45)
- user_agent — text
- payload — text — NOT NULL
- last_activity — int(11) — NOT NULL
shipment_addresses
- id — bigint(20) — Primary key — NOT NULL
- shipment_id — bigint(20) — Foreign key → shipments.id — NOT NULL
- user_id — bigint(20) — Foreign key → users.id — NOT NULL
- methods — varchar(255) — NOT NULL
- first_name — varchar(255) — NOT NULL
- last_name — varchar(255) — NOT NULL
- address_line_1 — varchar(255) — NOT NULL
- address_line_2 — varchar(255)
- address_line_3 — varchar(255)
- city — varchar(255) — NOT NULL
- state — varchar(255) — NOT NULL
- zip_code — varchar(255) — NOT NULL
- country — varchar(255) — NOT NULL
- created_at — timestamp
- updated_at — timestamp
shipment_details
- id — bigint(20) — Primary key — NOT NULL
- shipment_id — bigint(20) — Foreign key → shipments.id — NOT NULL
- order_detail_id — bigint(20) — Foreign key → order_details.id — NOT NULL
- quantity — int(11) — NOT NULL
- created_at — timestamp
- updated_at — timestamp
shipment_options
- id — bigint(20) — Primary key — NOT NULL
- name — varchar(255) — NOT NULL
- shipment_type — tinyint(4) — NOT NULL
- distribution — varchar(255) — NOT NULL
- description — text
- shipping_duration — varchar(255)
- shipping_fee — decimal(10,2) — NOT NULL
- free_shipping_threshold — decimal(10,2)
- created_at — timestamp
- updated_at — timestamp
shipments
- id — bigint(20) — Primary key — NOT NULL
- order_id — bigint(20) — Foreign key → orders.id — NOT NULL
- user_id — bigint(20) — Foreign key → users.id — NOT NULL
- status — varchar(255) — NOT NULL
- customer_status — varchar(255) — NOT NULL
- type — varchar(255) — NOT NULL
- cost — decimal(10,2)
- carrier — varchar(255)
- tracking_number — varchar(255) — NOT NULL
- created_at — timestamp
- updated_at — timestamp
taggables
- tag_id — int(11) — NOT NULL
- taggable_id — int(11) — NOT NULL
- taggable_type — varchar(255) — NOT NULL
tags
- id — bigint(20) — Primary key — NOT NULL
- name — varchar(255) — NOT NULL
- meta_title — text
- og_url — text
- og_image — text
- meta_description — text
- robots — text
- canonical — text
- created_at — timestamp
- updated_at — timestamp
- desktop_image_id — bigint(20) — Foreign key → images.id
- mobile_image_id — bigint(20) — Foreign key → images.id
- thumbnail_image_id — bigint(20) — Foreign key → images.id
- status — varchar(255)
- description — text
user_favorites
- id — bigint(20) — Primary key — NOT NULL
- user_id — bigint(20) — Foreign key → users.id — NOT NULL
- product_id — bigint(20) — Foreign key → products.id — NOT NULL
- created_at — timestamp
- updated_at — timestamp
user_histories
- id — bigint(20) — Primary key — NOT NULL
- user_id — bigint(20) — Foreign key → users.id — NOT NULL
- product_id — bigint(20) — Foreign key → products.id — NOT NULL
- created_at — timestamp
- updated_at — timestamp
users
- id — bigint(20) — Primary key — NOT NULL
- username — varchar(60) — NOT NULL
- password — varchar(255)
- two_factor_secret — text
- two_factor_recovery_codes — text
- v1_password — varchar(255)
- email — varchar(100) — NOT NULL
- name — varchar(60)
- first_name — varchar(30)
- last_name — varchar(30)
- phone_country_code — varchar(5) — NOT NULL
- phone_number — varchar(15) — NOT NULL
- level — tinyint(4) — NOT NULL
- is_marketable — tinyint(1) — NOT NULL
- is_premium — tinyint(1) — NOT NULL
- remember_token — varchar(100)
- current_team_id — bigint(20)
- profile_photo_path — varchar(2048)
- email_verified_at — timestamp
- created_at — timestamp
- updated_at — timestamp
- deleted_at — timestamp