우주드로우 erd
테이블 (15)
Oauth provider (auth_provider)
- Key (id) — int — 기본 키 — NOT NULL
- Key (users.id) — int — 외래 키 → 유저.Key — NOT NULL
- Field (provider) — varchar(30)
- Field (provier_user_id) — varchar(255)
- Field (email_at_provider) — varchar(255)
- Field (linked_at) — timestamp
- Field (unlinked_at) — timestamp
- Field (created_at) — timestamp
- Field (updated_at) — timestamp
Refresh tokens (refresh_tokens)
- Key (id) — int — 기본 키 — NOT NULL
- Key (users.id) — int — 외래 키 → 유저.Key — NOT NULL
- Field (token_hash) — varchar(255)
- Field (issued_at) — timestamp
- Field (expires_at) — timestamp
- Field (revoked_at) — tiemstamp
- Field (device_id) — varchar(100)
- Field (user_agent) — text
- Field (ip) — varchar(45)
- Field (created_at) — timestamp
daily contents (daily_entries)
- Key (id) — int — 기본 키 — NOT NULL
- Key (users_id) — int — 외래 키 → 유저.Key — NOT NULL
- Field (daily_type) — varchar(30)
- Field (entry_type) — date
- Field (content) — text
- Field (emotion_value) — int
- Field (emotion_color) — varchar(20)
- Key (drawing_image_id) — int — 외래 키 → 이미지(s3).Key — NOT NULL
- Field (created_at) — timestamp
- Field (updated_at) — timestamp
- Field (deleted_at) — timestamp
daily result (daily_results)
- Key (id) — int — 기본 키 — NOT NULL
- Key (daily_entries.id) — int — 외래 키 → daily contents.Key — NOT NULL
- Field (result) — text
- Field (raw) — jsonb
- Field (created_at) — timestamp
deep questions (deep_questions)
- Key (id) — int — 기본 키 — NOT NULL
- Key (deep_sessions.id) — int — 외래 키 → deep session.Key — NOT NULL
- Field (question_text) — text
- Field (order_no) — smallint
- Field (created_at) — timestamptz
deep result (deep_results)
- Key (id) — int — 기본 키 — NOT NULL
- Key (deep_sessions.id) — int — 외래 키 → deep session.Key — NOT NULL
- Field (result) — text
- Field (raw) — jsonb
- Field (created_at) — timestamptz
deep session (deep_sessions)
- Key (id) — int — 기본 키 — NOT NULL
- Key (user_id) — int — 외래 키 → 유저.Key — NOT NULL
- Key (star_id) — int — 외래 키 → star.Key — NOT NULL
- Field (deep_type) — varchar(30)
- Field (submitted_at) — timestamptz
- Field (completed_at) — timestamptz
- Field (created_at) — timestamptz
- Field (updated_at) — timestamptz
- Field (status) — varchar(20)
deep 사용자 답변 (deep_answers)
- Key (id) — int — 기본 키 — NOT NULL
- Key (question_id) — int — 외래 키 → deep questions.Key — NOT NULL
- Key (deep_session_id) — int — 외래 키 → deep session.Key — NOT NULL
- Field (answer_text) — text
- Field (created_at) — timestamp
- Field (updated_at) — timestamp
deep 제출 이미지 (deep_submissions)
- Key (id) — int — 기본 키 — NOT NULL
- Key (deep_seession_id) — int — 외래 키 → deep session.Key — NOT NULL
- Key (image_id) — int — 외래 키 → 이미지(s3).Key — NOT NULL
- Field (type) — varchar(20)
- Field (created_at) — timestamp
star (stars)
- Key (id) — int — 기본 키 — NOT NULL
- Key (user_id) — int — 외래 키 → 유저.Key — NOT NULL
- Key (daily_entry_id) — int — 외래 키 → daily contents.Key — NOT NULL
- Field (kind) — varchar(20)
- Field (week_start_date) — date
- Field (star_color) — varchar(20)
- Field (x) — float
- Field (y) — float
- Field (size) — numeric(6,2)
- Field (shape_type) — varchar(30)
- Field (created_at) — timestamp
- Field (updated_at) — timestamp
별자리 (constellations)
- Key (id) — int — 기본 키 — NOT NULL
- Key (users.id) — int — 외래 키 → 유저.Key — NOT NULL
- Field (week_start_date) — date
- Field (week_end_date) — date
- Field (created_at) — timestamptz
별자리 연결 선 (constellation_edges)
- Key (id) — int — 기본 키 — NOT NULL
- Key (constellations.id) — int — 외래 키 → 별자리.Key — NOT NULL
- Key (from_star_id) — int — 외래 키 → star.Key — NOT NULL
- Key (to_star_id) — int — 외래 키 → star.Key — NOT NULL
- Field (weight) — smallint
- Field (created_at) — timestamptz
심리 검사 결과 (deep_psych_assessments)
- Key (id) — int — 기본 키 — NOT NULL
- Key (deep_sessions.id) — int — 외래 키 → deep session.Key — NOT NULL
- Field (test_code) — varchar(20)
- Field (score_total) — int
- Field (score_positive) — smallint
- Field (score_negative) — smallint
- Field (score_balance) — smallint
- Field (raw) — jsonb
- Field (created_at) — timestamptz
유저 (users)
- Key (id) — int — 기본 키 — NOT NULL
- Field (email) — varchar(50)
- Field (password) — varchar(50)
- Field (nickname) — varchar(50)
- Field (status) — varchar(20)
- Field (last_login_at) — timestamptz
- Field (created_at) — timestamptz
- Field (updated_at) — timestamptz
- Field (deleted_at) — timestamptz
이미지(s3) (images)
- Key (id) — int — 기본 키 — NOT NULL
- Key (user_id) — int — 외래 키 → 유저.Key — NOT NULL
- Field (image_key) — text
- Field (mime_type) — varchar(50)
- Field (byte_size) — bigint
- Field (width) — int
- Field (height) — int
- Field (status) — varchar(20)
- Field (created_at) — timestamptz
- Field (deleted_at) — timestamptz