asf
Tables (9)
Category
- category_id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(100) — NOT NULL
Order
- order_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → User.user_id — NOT NULL
- order_date — TIMESTAMP — NOT NULL
- total_price — DECIMAL(10,2) — NOT NULL
- status — ENUM('pending', 'shipped', 'delivered', 'cancelled') — NOT NULL
Order_Item
- order_item_id — BIGINT — Primary key — NOT NULL
- order_id — BIGINT — Foreign key → Order.order_id — NOT NULL
- product_id — BIGINT — Foreign key → Product.product_id — NOT NULL
- quantity — INT — NOT NULL
- price — INT — NOT NULL
Payment
- payment_id — BIGINT — Primary key — NOT NULL
- order_id — BIGINT — Foreign key → Order.order_id — NOT NULL
- payment_method — ENUM('credit_card', 'paypal', 'bank_transfer') — NOT NULL
- status — ENUM('pending', 'completed', 'failed') — NOT NULL
- paid_at — TIMESTAMP
Product
- product_id — BIGINT — Primary key — NOT NULL
- store_id — BIGINT — Foreign key → Store.store_id — NOT NULL
- category_id — BIGINT — Foreign key → Category.category_id — NOT NULL
- name — VARCHAR(255) — NOT NULL
- price — INT — NOT NULL
- stock — INT — NOT NULL
- description — TEXT
- image_url — VARCHAR(500) — NOT NULL
- state — ENUM('active', 'inactive') — NOT NULL
- created_at — TIMESTAMP — NOT NULL
Review
- review_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → User.user_id — NOT NULL
- product_id — BIGINT — NOT NULL
- rating — TINYINT — NOT NULL
- content — TEXT
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
- status — ENUM('active', 'inactive') — NOT NULL
Shipment
- shipment_id — BIGINT — Primary key — NOT NULL
- order_id — BIGINT — Foreign key → Order.order_id — NOT NULL
- shipping_address — TEXT — NOT NULL
- status — ENUM('pending', 'shipped', 'delivered') — NOT NULL
- shipped_at — TIMESTAMP
- delivered_at — TIMESTAMP
Store
- store_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → User.user_id — NOT NULL
- store_name — VARCHAR(150) — NOT NULL
- description — TEXT
- created_at — TIMESTAMP — NOT NULL
User
- user_id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(100) — NOT NULL
- email — VARCHAR(255) — NOT NULL
- password — VARCHAR(255) — NOT NULL
- role — ENUM('influencer', 'customer') — NOT NULL
- phone — VARCHAR(20) — NOT NULL
- address — TEXT
- profile_image — VARCHAR(500)
- follwer — INT — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
- status — ENUM('active', 'inactive') — NOT NULL