Coupon System
테이블 (4)
사용자 (Member)
- 사용자 아이디 (member_id) — notnull — 기본 키 — NOT NULL
- 이름 (name) — notnull
- 등급 (grade) — notnull
- 생성 시간 (created_at) — notnull
- 수정 시간 (modified_at) — notnull
쿠폰 (Coupon)
- 쿠폰 아이디 (coupon_id) — notnull — 기본 키 — NOT NULL
- 쿠폰 종류 (coupon_type) — notnull
- 발급 수량 (quantity) — notnull
- 유효 기간 (validity_period) — notnull
- 생성 시간 (created_at) — notnull
- 수정 시간 (modified_at) — notnull
쿠폰 이력 (CouponHistory)
- 쿠폰 이력 아이디 (coupon_history_id) — notnull — 기본 키 — NOT NULL
- 쿠폰 사용자 아이디 (coupon_member_id) — notnull
- 종류 (history_type) — notnull
- 생성 시간 (created_at) — notnull
쿠폰-사용자 (CouponMember)
- 쿠폰 사용자 아이디 (coupon_member_id) — notnull — 기본 키 — NOT NULL
- 쿠폰 아이디 (coupon_id) — notnull — 외래 키 → 쿠폰.쿠폰 아이디 — NOT NULL
- 사용자 아이디 (member_id2) — notnull — 외래 키 → 사용자.사용자 아이디 — NOT NULL
- 상태 (status) — notnull
- 생성 시간 (created_at) — notnull
- 수정 시간 (modified_at) — notnull