TDD
Tables (12)
categories
- id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(30) — NOT NULL
- icon_url — VARCHAR(500)
- sort_order — SMALLINT
- created_at — TIMESTAMP — NOT NULL
chat_messages
- id — BIGINT — Primary key — NOT NULL
- pod_id — BIGINT — Foreign key → delivery_pods.id — NOT NULL
- sender_id — BIGINT — Foreign key → users.id — NOT NULL
- content — TEXT — NOT NULL
- created_at — TIMESTAMP — NOT NULL
comments
- id — BIGINT — Primary key — NOT NULL
- post_id — BIGINT — Foreign key → posts.id — NOT NULL
- author_id — BIGINT — Foreign key → users.id — NOT NULL
- parent_comment_id — BIGINT — Foreign key → comments.id
- content — TEXT — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
delivery_pods
- id — BIGINT — Primary key — NOT NULL
- host_id — BIGINT — Foreign key → users.id — NOT NULL
- category_id — BIGINT — Foreign key → categories.id — NOT NULL
- dorm_building — VARCHAR(20) — NOT NULL
- max_participants — SMALLINT — NOT NULL
- current_participants — SMALLINT — NOT NULL
- order_scheduled_at — TIMESTAMP — NOT NULL
- status — VARCHAR(20) — NOT NULL
- matched_at — TIMESTAMP
- canceled_at — TIMESTAMP
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
email_verifications
- id — BIGINT — Primary key — NOT NULL
- email — VARCHAR(255) — NOT NULL
- code — VARCHAR(10) — NOT NULL
- expires_at — TIMESTAMP — NOT NULL
- verified_at — TIMESTAMP
- attempt_count — SMALLINT — NOT NULL
- created_at — TIMESTAMP — NOT NULL
manner_reviews
- id — BIGINT — Primary key — NOT NULL
- pod_id — BIGINT — Foreign key → delivery_pods.id — NOT NULL
- reviewer_id — BIGINT — Foreign key → users.id — NOT NULL
- target_id — BIGINT — Foreign key → users.id — NOT NULL
- type — VARCHAR(20) — NOT NULL
- status — VARCHAR(20) — NOT NULL
- reviewed_at — TIMESTAMP
- created_at — TIMESTAMP — NOT NULL
pod_participants
- id — BIGINT — Primary key — NOT NULL
- pod_id — BIGINT — Foreign key → delivery_pods.id — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- role — VARCHAR(10) — NOT NULL
- joined_at — TIMESTAMP — NOT NULL
posts
- id — BIGINT — Primary key — NOT NULL
- author_id — BIGINT — Foreign key → users.id — NOT NULL
- scope — VARCHAR(10) — NOT NULL
- dorm_building — VARCHAR(20)
- title — VARCHAR(200)
- content — TEXT — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
settlement_accounts
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- bank_name — VARCHAR(50) — NOT NULL
- account_number — VARCHAR(255) — NOT NULL
- account_holder — VARCHAR(50) — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
tteut_score_logs
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- review_id — BIGINT — Foreign key → manner_reviews.id
- delta — NUMERIC(4,1) — NOT NULL
- reason — VARCHAR(30) — NOT NULL
- score_after — NUMERIC(4,1) — NOT NULL
- created_at — TIMESTAMP — NOT NULL
user_devices
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- endpoint — TEXT — NOT NULL
- p256dh — VARCHAR(255) — NOT NULL
- auth — VARCHAR(255) — NOT NULL
- platform — VARCHAR(20)
- last_seen_at — TIMESTAMP
- created_at — TIMESTAMP — NOT NULL
users
- id — BIGINT — Primary key — NOT NULL
- 소셜 로그인 제공자 (provider) — VARCHAR(20) — NOT NULL
- 소셜 로그인 식별자 (provider_user_id) — VARCHAR(255)
- 학교 이메일 (email) — VARCHAR(255) — NOT NULL
- 비밀번호 해시값 (password_hash) — VARCHAR(255)
- 닉네임 (nickname) — VARCHAR(30) — NOT NULL
- 거주동 (dorm_building) — VARCHAR(20) — NOT NULL
- 거주 층 (dorm_floor) — SMALLINT — NOT NULL
- 매너 온도 (tteut_score) — NUMERIC(4,1) — NOT NULL
- 계정 상태 (status) — VARCHAR(20) — NOT NULL
- 승인 요소 (noshow_count) — INT — NOT NULL
- 정지 종료 시각 (suspended_until) — TIMESTAMP
- 최종 이메일 인증 (last_auth_at) — TIMESTAMP — NOT NULL
- 탈퇴 시각 (withdrawn_at) — TIMESTAMP
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL