선착순구매프로젝트
테이블 (11)
categories
- id (category_id) — NOT NULL — 기본 키 — NOT NULL
- id (Key) — 외래 키 → exam.id — NOT NULL
- 회원아이디 (user_id) — NOT NULL — 외래 키 → exam.회원아이디 — NOT NULL
- id (purchase_snapshot_id) — NOT NULL — 외래 키 → exam.id — NOT NULL
- id (Key2) — bingint — 외래 키 → exam.id — NOT NULL
- id (id2) — NOT NULL — 외래 키 → exam.id — NOT NULL
- name — VARCHAR(50) — NOT NULL — Category name
- description — TEXT — Detailed description of the category
- created_at — TIMESTAMP — NOT NULL
exam (CopyOfexam_sessions)
- id (Key) — 기본 키 — NOT NULL
- 회원아이디 (user_id) — NOT NULL — 외래 키 → 회원.회원아이디 — NOT NULL
- id (purchase_snapshot_id) — NOT NULL — 외래 키 → 회원.id — NOT NULL
- id (Key2) — bingint — 외래 키 → 회원.id — NOT NULL
- id (id2) — NOT NULL — 외래 키 → 회원.id — NOT NULL
- id — INT — NOT NULL
- instructor_id — INT — NOT NULL — FK to users.id
- category_id — INT — NOT NULL — FK to categories.id
- title — VARCHAR(100) — NOT NULL
- start_time — TIMESTAMP — NOT NULL
- end_time — TIMESTAMP — NOT NULL
- max_participants — INT — NOT NULL — Maximum allowed participants
- Field
- Field2
- Field3
orders
- id (Key2) — bigint — 기본 키 — NOT NULL
- Key — 외래 키 → purchases (구매 테이블).id — NOT NULL
- status (purchase_id) — varchar()255) — NOT NULL — FK to purchases.id
- total_amount — DECIMAL(10, 2) — NOT NULL — Total payment amount
- order_status — VARCHAR(50) — NOT NULL
- Field
purchase_snapshot (구매내역 스냅샷)
- id (purchase_snapshot_id) — NOT NULL — 기본 키 — NOT NULL
- id (Key) — bingint — 외래 키 → purchases (구매 테이블).id — NOT NULL
- id — INT — NOT NULL
- instructor_id — INT — NOT NULL — FK to users.id
- category_id — INT — NOT NULL — FK to categories.id
- title — VARCHAR(100) — NOT NULL
- start_time — TIMESTAMP — NOT NULL
- end_time — TIMESTAMP — NOT NULL
- max_participants — INT — NOT NULL — Maximum allowed participants
purchases (구매 테이블) (purchases)
- id (Key) — bingint — 기본 키 — NOT NULL
- user_id — INT — NOT NULL — FK to users.id
- exam_id — bigint — NOT NULL — FK to exam_sessions.id
- 구매상태 (status) — bigint — NOT NULL — Payment status
- 구매시간 (purchase_time) — NOT NULL — NOT NULL
refunds
- id (Key2) — 기본 키 — NOT NULL
- id (Key22) — bigint — 외래 키 → orders.id — NOT NULL
- Key — 외래 키 → orders.Key — NOT NULL
- id — INT — NOT NULL
- order_id — INT — NOT NULL — FK to orders.id
- refund_amount — DECIMAL(10, 2) — NOT NULL — Refund amount
- refund_status — VARCHAR(50) — NOT NULL
- reason — TEXT — NOT NULL — Reason for refund
results
- Key — 기본 키 — NOT NULL
- id (Key2) — 외래 키 → exam.id — NOT NULL
- 회원아이디 (user_id2) — NOT NULL — 외래 키 → exam.회원아이디 — NOT NULL
- id (purchase_snapshot_id) — NOT NULL — 외래 키 → exam.id — NOT NULL
- id (Key22) — bingint — 외래 키 → exam.id — NOT NULL
- id (id22) — NOT NULL — 외래 키 → exam.id — NOT NULL
- id — INT — NOT NULL
- user_id — INT — NOT NULL — FK to users.id
- session_id — INT — NOT NULL — FK to exam_sessions.id
- score — INT — NOT NULL
- correct_answers — INT — NOT NULL
- Field
wishlists
- id (wishlist_id) — NOT NULL — 기본 키 — NOT NULL
- 회원아이디 (user_id2) — NOT NULL — 외래 키 → 회원.회원아이디 — NOT NULL
- id (purchase_snapshot_id) — NOT NULL — 외래 키 → 회원.id — NOT NULL
- id (Key) — bingint — 외래 키 → 회원.id — NOT NULL
- id (id22) — NOT NULL — 외래 키 → 회원.id — NOT NULL
- 회원아이디 (user_id) — NOT NULL — NOT NULL — FK to users.id
- 시험아이디 (exam_id) — NOT NULL — NOT NULL — FK to exam_sessions.id
- 생성시간 (created_at) — NOT NULL — NOT NULL
- 수정시간 (modified_at) — NOT NULL — NOT NULL
리프레시 토큰 (refresh_token)
- id — NOT NULL — 기본 키 — NOT NULL
- 유저아이디 (user_id) — NOT NULL — NOT NULL — FK to users.id
- 토큰 값 (value) — NOT NULL — NOT NULL
- 생성시간 (created_at) — NOT NULL — NOT NULL
- 수정한시간 (modified_at) — NOT NULL — NOT NULL
학생 시험성적 (Result)
- Key — 기본 키 — NOT NULL
- email — VARCHAR(100) — 기본 키 — NOT NULL — Login email
- id (Key2) — 외래 키 → exam.id — NOT NULL
- 회원아이디 (user_id2) — NOT NULL — 외래 키 → exam.회원아이디 — NOT NULL
- id (purchase_snapshot_id) — NOT NULL — 외래 키 → exam.id — NOT NULL
- id (Key22) — bingint — 외래 키 → exam.id — NOT NULL
- id (id22) — NOT NULL — 외래 키 → exam.id — NOT NULL
- modified_at — TIMESTAMP — NOT NULL
- password — VARCHAR(255) — NOT NULL — Encrypted password
- id — INT — NOT NULL
- name — VARCHAR(50) — NOT NULL
- phone — VARCHAR(20) — NOT NULL
- created_at — TIMESTAMP — NOT NULL
회원 (user)
- 회원아이디 (user_id) — NOT NULL — 기본 키 — NOT NULL
- id (purchase_snapshot_id) — NOT NULL — 외래 키 → purchase_snapshot.id — NOT NULL
- id (Key) — bingint — 외래 키 → purchase_snapshot.id — NOT NULL
- id (id2) — NOT NULL — 외래 키 → 리프레시 토큰.id — NOT NULL
- 회원 이름 (name) — NOT NULL — NOT NULL
- 전화번호 (phone) — NOT NULL — NOT NULL
- 비밀번호 (password) — NOT NULL — NOT NULL — Encrypted password
- 이메일 (email) — NOTNULL — NOT NULL
- 생성시간 (created_at) — NOT NULL — NOT NULL
- 수정 시간 (modified_at) — NOT NULL — NOT NULL