sentic
Tables (9)
announcements
- announcement_id — BIGINT — Primary key — NOT NULL
- admin_id — BIGINT — Foreign key → users.user_id — NOT NULL
- title — VARCHAR(200) — NOT NULL
- content — TEXT — NOT NULL
- is_pinned — BOOLEAN — NOT NULL
- is_deleted — BOOLEAN — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
- INDEX — `idx_announcements_pinned`
feedbacks
- feedback_id — BIGINT — Primary key — NOT NULL
- room_id — BIGINT — Foreign key → rooms.room_id — NOT NULL
- message_id — BIGINT — Foreign key → messages.message_id
- grammar_errors — JSON
- natural_expressions — JSON
- slang_expressions — JSON
- overall_comment — TEXT
- created_at — DATETIME — NOT NULL
- INDEX — `idx_feedbacks_room`
messages
- message_id — BIGINT — Primary key — NOT NULL
- room_id — BIGINT — Foreign key → rooms.room_id — NOT NULL
- sender_type — ENUM('USER','AI') — NOT NULL
- content_text — TEXT
- audio_url — VARCHAR(500)
- sequence_no — INT — NOT NULL
- created_at — DATETIME — NOT NULL
- INDEX — `idx_messages_room_seq`
payments
- payment_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- plan_id — INT — Foreign key → subscription_plans.plan_id — NOT NULL
- amount — INT — NOT NULL
- status — ENUM('PENDING','SUCCESS','FAILED','CANCELLED') — NOT NULL
- payment_method — VARCHAR(50)
- external_payment_id — VARCHAR(200)
- paid_at — DATETIME
- expires_at — DATETIME
- created_at — DATETIME — NOT NULL
- INDEX — `idx_payments_user_status`
rooms
- room_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- room_type — ENUM('VOICE','CHAT') — NOT NULL
- room_name — VARCHAR(100)
- character_name — VARCHAR(50)
- participant_count — INT
- situation — TEXT
- difficulty — ENUM('BEGINNER','INTERMEDIATE','ADVANCED') — NOT NULL
- is_random — BOOLEAN — NOT NULL
- last_active_at — DATETIME
- is_deleted — BOOLEAN — NOT NULL
- created_at — DATETIME — NOT NULL
- INDEX — `idx_rooms_user_active`
scraps
- scrap_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- feedback_id — BIGINT — Foreign key → feedbacks.feedback_id
- expression — VARCHAR(500) — NOT NULL
- context — TEXT
- category — ENUM('단어','문법','문장')
- user_note — TEXT
- created_at — DATETIME — NOT NULL
- INDEX — `idx_scraps_user_created`
- INDEX — `idx_scraps_user_category`
subscription_plans
- plan_id — INT — Primary key — NOT NULL
- plan_name — VARCHAR(50) — NOT NULL
- price — INT — NOT NULL
- duration_days — INT — NOT NULL
- room_limit — INT
- is_active — BOOLEAN — NOT NULL
- created_at — DATETIME — NOT NULL
user_settings
- setting_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- default_mode — ENUM('VOICE','CHAT') — NOT NULL
- default_difficulty — ENUM('BEGINNER','INTERMEDIATE','ADVANCED') — NOT NULL
- subtitle_enabled — BOOLEAN — NOT NULL
- notification_enabled — BOOLEAN — NOT NULL
- updated_at — DATETIME — NOT NULL
users
- user_id — BIGINT — Primary key — NOT NULL
- email — VARCHAR(100)
- password_hash — VARCHAR(255)
- nickname — VARCHAR(50) — NOT NULL
- profile_image_url — VARCHAR(500)
- provider — ENUM('LOCAL','KAKAO','GOOGLE') — NOT NULL
- provider_id — VARCHAR(255)
- role — ENUM('USER','ADMIN') — NOT NULL
- is_active — BOOLEAN — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL