Coupon
테이블 (4)
사용자쿠폰 (user_coupon)
- 사용자쿠폰 ID (id) — int4 — 기본 키 — NOT NULL
- 쿠폰 ID (coupon_id) — int4 — 외래 키 → 쿠폰.쿠폰 ID — NOT NULL
- 자체 시작 일자 (started_at) — timestamp
- 자체 만료 일자 (ended_at) — timestamp
- 발급 이후 유효 일자 (expired_days) — Int
- 사용여부 (coupon_usage) — timestamp
- 사용자id (user_id) — int4
- 생성일 (created_at) — timestamp
- 갱신일 (updated_at) — timestamp
쿠폰 (coupon)
- 쿠폰 ID (id) — int4 — 기본 키 — NOT NULL
- 쿠폰코드 (coupon_code) — varchar(100)
- 쿠폰타입 (discount_type) — varchar(50)
- 할인정보 (coupon_value) — varchar(50)
- 자체 시작 일자 (started_at) — timestamp
- 자체 만료 일자 (ended_at) — timestamp
- 발급 이후 유효 일자 (expired_days) — Int
- 쿠폰갯수 (coupon_count) — Int
- 쿠폰상태 (coupon_status) — varchar(20)
- 생성일 (created_at) — timestamp
- 갱신일 (updated_at) — timestamp
- 최대 할인금액 (max_discount) — Int
쿠폰사용내역 (coupon_history)
- 내역id (id) — int4 — 기본 키 — NOT NULL
- 쿠폰 ID (coupon_id) — int4 — 외래 키 → 쿠폰.쿠폰 ID — NOT NULL
- 사용일자 (used_at) — timestamp
- 상품id (product_id) — int4
- 회원id (user_id) — int4
- 생성일 (created_at) — timestamp