Kiwi
테이블 (15)
Accounts (accounts)
- account_id — Big Int — 기본 키 — NOT NULL
- email — charater varying
- password_hash — charater varying
- created_at — datetime
- updated_at — datetime
- is_deleted — boolean
- deleted_at — datetime
- Field (is_verified) — boolean
- Field (verified_at) — datetime
Cbt 원인 태그 (tags)
- tags_id (tag_id) — Big Int — 기본 키 — NOT NULL
- name — varchar
- created_at — DateTime
Untitled (item_categories)
- Key (item_category_id) — 기본 키 — NOT NULL
- Field (name)
- Field2 (created_at)
Untitled (items)
- Key (item_id) — 기본 키 — NOT NULL
- Key (item_category_id) — 외래 키 → Untitled.Key — NOT NULL
- Field2 (name)
- Field3 (description)
- Field2 (image_url)
- Field3 (price)
- Field4 (is_active)
- Field5 (created_at)
- Field2 (updated_at)
Untitled (user_items)
- Key (user_item_id) — 기본 키 — NOT NULL
- Key (item_id) — 외래 키 → Untitled.Key — NOT NULL
- user_id — Big Int — 외래 키 → 회원.user_id — NOT NULL
- Field (acquired_at)
- Field (is_owned)
Untitled (user_equipped_items)
- Key (user_equipped_item_id) — 기본 키 — NOT NULL
- user_id — Big Int — 외래 키 → 회원.user_id — NOT NULL
- Key (item_category_id) — 외래 키 → Untitled.Key — NOT NULL
- Key (item_id2) — 외래 키 → Untitled.Key — NOT NULL
- Field (equipped_at)
Untitled (cbt_sessions)
- Key (cbt_session_id) — Big Int — 기본 키 — NOT NULL
- record_id — Big Int — 외래 키 → 감정기록.record_id — NOT NULL
- tags_id (tag_id) — Big Int — 외래 키 → Cbt 원인 태그.tags_id — NOT NULL
- Field (before_emotion_score) — Int
- Field (after_emotion_score) — Int
- Field (created_at) — DateTime
- Field (updated_at) — DateTime
- Field (tool_code) — VarChar
Untitled (cbt_questions)
- Key (question_id) — Big Int — 기본 키 — NOT NULL
- Field (code) — Enum
- Field (question_text) — varchar
- Field (display_order) — Int
- Field (is_required) — boolean
- Field (is_active) — boolean
- Field (tool_code) — varchar
- Field (input_type) — varchar
Untitled (cbt_answers)
- Key (answer_id) — 기본 키 — NOT NULL
- Key (cbt_session_id) — Big Int — 외래 키 → Untitled.Key — NOT NULL
- Key (question_id) — Big Int — 외래 키 → Untitled.Key — NOT NULL
- Field (answer_text) — Varchar
- Field2 (created_at) — DateTime
- Field (updated_at) — DateTime
- Field (answer_value) — Int
감정 키워드 (keywords)
- keywords_id (keyword_id) — Big Int — 기본 키 — NOT NULL
- user_profiles_id (user_id) — Big Int — 외래 키 → 회원.user_id — NOT NULL
- name — varchar
- created_at — DateTime
감정기록 (records)
- record_id — Big Int — 기본 키 — NOT NULL
- user_profiles_id (user_id) — Big Int — 외래 키 → 회원.user_id — NOT NULL
- record_date — Date
- mood_score — Int
- craeted_at (created_at) — DateTime
- updated_at — DateTime
일기 (diaries)
- diary_id — Big Int — 기본 키 — NOT NULL
- record_id — Big Int — 외래 키 → 감정기록.record_id — NOT NULL
- title — varchar
- context (content) — varchar
- created_at — DateTime
- updated_at — DateTime
- is_deleted — boolean
- deleted_at — DateTime
키워드-기록 중간 테이블 (record_keywords)
- record_id — Big Int — 외래 키 → 감정기록.record_id — NOT NULL
- keywords_id (keyword_id) — Big Int — 외래 키 → 감정 키워드.keywords_id — NOT NULL
키위 거래 로그 (kiwi_transactions)
- tx_id — Big Int — 기본 키 — NOT NULL
- user_profiles_id (user_id) — Big Int — 외래 키 → 회원.user_id — NOT NULL
- amount — Int
- type — Enum(EARN_DIARY, EARN_CBT, USE_ITEM, REFUND_ITEM, ADMIN_ADJUST)
- created_at — DateTime
회원 (users)
- user_id — Big Int — 기본 키 — NOT NULL
- account_id — Big Int — 외래 키 → Accounts.account_id — NOT NULL
- nickname — varchar
- profile_image_url — varchar
- kiwi_balance — Int
- created_at — dateTime
- updated_at — dateTime