Best Seller Application ER Diagram
erDiagram
BESTSELLER_METRICS {
int id(pk)
int product_id(fk)
int total_sales
int weekly_sales
int monthly_sales
datetime last_sale_date
int rank_overall
int rank_weekly
int rank_monthly
datetime updated_at
}
PRODUCT {
int id(pk)
string name
string slug
int vendor_id(fk)
int shop_id(fk)
text description
int collection_id(fk)
decimal discount_percent
int category_id(fk)
string video
boolean is_featured
boolean is_active
datetime created_at
datetime updated_at
int brand_id(fk)
int fabric_id(fk)
text product_specification
text additional_information
text detailed_product_description
int status_id(fk)
text comment
int popularity
boolean is_customizable
decimal customized_price
}
SALES_METRICS {
int id(pk)
int vendor_id(fk)
int product_id(fk)
date date
decimal total_sales
int total_quantity
int new_customers
int total_orders
string filter_type
}
VENDOR {
int user_id(pk)
string company_name
string telephone
date company_created_at
text company_address
string certificate_image
string pan_vat_certificate_image
datetime created_at
datetime updated_at
}
BESTSELLER_METRICS ||--|| PRODUCT : tracks
SALES_METRICS ||--|{ PRODUCT : records
SALES_METRICS ||--|{ VENDOR : tracks