plus-project
Tables (3)
Coupons (쿠폰)
- id (아이디) — BIGINT — Primary key — NOT NULL
- name (쿠폰이름) — VARCHAR(255) — NOT NULL
- description (쿠폰내용(설명)) — VARCHAR(255) — NOT NULL
- discountAmount (할인금액) — INT — NOT NULL
- quantity (수량) — INT — NOT NULL
- startDate (쿠폰 시작일) — DATETIME(6) — NOT NULL
- endDate (쿠폰 종료일) — DATETIME(6) — NOT NULL
- createdAt (생성일) — DATETIME(6) — NOT NULL
- modifiedAT (수정일) — DATETIME(6) — NOT NULL
UserCoupons (유저쿠폰 관리 테이블)
- id (아이디) — BIGINT — Primary key — NOT NULL
- user_id (유저 아이디) — BIGINT — Foreign key → Users.id — NOT NULL
- coupon_id (쿠폰 아이디) — BIGINT — Foreign key → Coupons.id — NOT NULL
- status (쿠폰 상태) — ENUM — NOT NULL
- createdAt (쿠폰 발급일) — DATETIME(6) — NOT NULL
- modifiedAt (쿠폰 사용일) — DATETIME(6) — NOT NULL
Users (유저)
- id (아이디) — BIGINT — Primary key — NOT NULL
- email (이메일) — VARCHAR(255) — NOT NULL
- password (비밀번호) — VARCHAR(255) — NOT NULL
- nickname (닉네임) — VARCHAR(50) — NOT NULL
- address (주소) — VARCHAR(255) — NOT NULL
- userRole (유저권한) — ENUM — NOT NULL
- createdAt (생성일) — DATETIME(6) — NOT NULL
- modifiedAt (수정일) — DATETIME(6) — NOT NULL