ㅇㅇㅇ
Tables (8)
companies
- Key — Primary key — NOT NULL
- id — uuid
- business_registration_number — varchar — NOT NULL
- email — varchar — NOT NULL — 유효한 ㅇㅁㄴㅁ
- phone — varchar — NOT NULL — 한국
- password — varchar — NOT NULL — 해시
- created_at — timestamp
- updated_at — timestamp
consumer_order_items
- id — uuid
- order_id — uuid — Foreign key → consumer_orders.id — NOT NULL
- product_id — uuid — Foreign key → products.id — NOT NULL
- company_id — uuid — Foreign key → companies.id — NOT NULL
- quantity — int — NOT NULL
- price — decimal — NOT NULL
- created_at — timestamp
- updated_at — timestamp
- Key — Foreign key → companies.Key — NOT NULL
consumer_orders
- id — uuid
- order_number — varchar — NOT NULL
- consumer_id — uuid — Foreign key → consumers.id — NOT NULL
- delivery_address_id — uuid — Foreign key → delivery_addresses.id — NOT NULL
- total_amount — decimal — NOT NULL
- shipping_fee — decimal — NOT NULL
- order_status — varchar — NOT NULL
- payment_status — varchar — NOT NULL
- created_at — timestamp
- updated_at — timestamp
consumers
- id — uuid
- email — varchar — NOT NULL — 유효한
- phone — varchar — NOT NULL — 한국
- password — varchar — NOT NULL — 해시
- profile_image — varchar
- created_at — timestamp
- updated_at — timestamp
delivery_addresses
- id — uuid
- consumer_id — uuid — Foreign key → consumers.id — NOT NULL
- recipient_name — varchar — NOT NULL
- recipient_phone — varchar — NOT NULL
- address — text — NOT NULL
- is_default — boolean
- created_at — timestamp
product_reviews
- id — uuid
- consumer_id — uuid — Foreign key → consumers.id — NOT NULL
- product_id — uuid — Foreign key → products.id — NOT NULL
- rating — int — NOT NULL — 1부터
- review_text — text — NOT NULL
- review_image — varchar
- created_at — timestamp
- updated_at — timestamp
- Key — Foreign key → products.Key — NOT NULL
products
- id — uuid
- company_id — uuid — Foreign key → companies.id — NOT NULL
- price — decimal — NOT NULL — 0
- sales — int — 0
- halal_certified — boolean — NOT NULL
- halal_expiration — date — 인증
- halal_certificate — varchar
- main_image_url — varchar — NOT NULL
- created_at — timestamp
- updated_at — timestamp
- Key — Foreign key → companies.Key — NOT NULL
shopping_carts
- id — uuid
- consumer_id — uuid — Foreign key → consumers.id — NOT NULL
- product_id — uuid — Foreign key → products.id — NOT NULL
- quantity — int — NOT NULL
- created_at — timestamp
- updated_at — timestamp
- Key — Foreign key → products.Key — NOT NULL