dd
Tables (8)
COUPONS
- coupon_id — BIGINT
- coupon_policy_id — BIGINT — NOT NULL
- coupon_state — VARCHAR(20) — NOT NULL
COUPON_POLICIES
- coupon_policy_id — BIGINT
- expiration_days — INT — NOT NULL
- coupon_type — VARCHAR(20) — NOT NULL
- issuable_quantity — INT — NOT NULL
- remaining_quantity — INT — NOT NULL
- discount_rate — DECIMAL(5, 2)
- discount_amount — DECIMAL(10, 2)
MAP_USER_COUPON
- user_id — BIGINT — Primary key — NOT NULL
- coupon_id — BIGINT — Primary key — NOT NULL
ORDERS
- order_id — BIGINT
- user_id — BIGINT — NOT NULL
- order_status — VARCHAR(20) — NOT NULL
- total_amount — BIGINT — NOT NULL
- discount_amount — BIGINT — NOT NULL
- order_date — TIMESTAMP
ORDER_ITEMS
- order_item_id — BIGINT
- order_id — BIGINT — NOT NULL
- user_id — BIGINT — NOT NULL
- product_name — VARCHAR(255) — NOT NULL
- product_amount — BIGINT — NOT NULL
- order_quantity — INT — NOT NULL
- product_id — BIGINT — NOT NULL
PAYMENT_HISTORY
- payment_history_id — BIGINT
- order_id — BIGINT — NOT NULL
- user_id — BIGINT — NOT NULL
- amount — BIGINT — NOT NULL
- discount_amount — BIGINT — NOT NULL
- coupon_id — BIGINT
- payment_status — VARCHAR(20) — NOT NULL
- requested_at — DATETIME
- updated_at — DATETIME
USERS
- user_id — BIGINT
- accounts — VARCHAR(30) — NOT NULL
products
- product_id — BIGINT
- name — VARCHAR(255) — NOT NULL
- description — TEXT — NOT NULL
- category — VARCHAR(20) — NOT NULL
- price — BIGINT — NOT NULL
- created_at — TIMESTAMP
- updated_at — TIMESTAMP
- quantity — INT — NOT NULL
- stats — VARCHAR(20) — NOT NULL