coupon
Tables (4)
Coupon (Untitled)
- id — int(11) — Primary key — NOT NULL
- type (Field) — varchar(64)
- name — varchar(64)
- salePercent — int(16)
- salePrice — int(16)
- status (Field3) — varchar(64) — 유효 기간 이내라도 종료될 수 있는 기능이 필요해 status 값으로 제어
- isDuplicated — varchar(64) — 쿠폰 중복 사용가능여부
- createdAt — datetime
- updatedAt — datetime
Payments (Untitled4)
- id (Key) — Primary key — NOT NULL
- userId (Key2) — Foreign key → Users.id — NOT NULL
Usercoupon (Untitled2)
- id (Key) — Primary key — NOT NULL
- userId — Foreign key → Users.id — NOT NULL
- paymentId — Foreign key → Payments.id — NOT NULL
- couponId (id) — int(11) — Foreign key → Coupon.id — NOT NULL
- memo — varchar(64) — 개별/일괄 기록을 위한 메모 필드
- expiredDate
- createdAt (Field) — datetime
- updatedAt (Field2) — datetime
Users (Untitled3)
- id (Key) — Primary key — NOT NULL