coupon
Tables (5)
coupon (Untitled2)
- coupon_id (Field) — Primary key
- name (Field2)
- type (Field3)
- discount_value (Field4)
- min_price (Field5)
- expires_at (Field6)
- is_active (Field7)
coupon_usage_log (Untitled4)
- log_id (Field) — Primary key
- user_coupon_id (Field2) — Foreign key → user_coupon.user_coupon_id
- order_id (Key) — Foreign key → order.order_id — NOT NULL
- used_at (Field3)
order (Untitled5)
- order_id (Key) — Primary key — NOT NULL
user (Untitled)
- user_id (Key) — Primary key — NOT NULL
user_coupon (Untitled3)
- user_coupon_id (Field) — Primary key
- user_id (Key) — Foreign key → user.user_id — NOT NULL
- coupon_id (Field2) — Foreign key → coupon.coupon_id
- status (Field3)
- assigned_at (Field4)
- used_at (Field5)
- expires_at (Field6)