v1_test

Tables (11)

ai_chat_rooms

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — NOT NULL
  • active_user_id — BIGINT
  • status — VARCHAR(20) — NOT NULL — PENDING, ACTIVE, ANALYZING, COMPLETED, EXPIRED
  • purge_at — DATETIME(6) — AI 세션 만료 예상 시각 = 대화 원문 삭제 예정 시각
  • version — BIGINT — NOT NULL — 낙관적 락(@Version)
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL
  • deleted_at — DATETIME(6)

ai_messages

  • id — BIGINT — Primary key — NOT NULL
  • ai_chat_room_id — BIGINT — Foreign key → ai_chat_rooms.id — NOT NULL
  • client_message_id — VARCHAR(36)
  • reply_to_message_id — BIGINT
  • sender_type — VARCHAR(20) — NOT NULL — USER, AI
  • content — TEXT — NOT NULL
  • created_at — DATETIME(6) — NOT NULL
  • deleted_at — DATETIME(6)

auth_sessions

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — NOT NULL
  • refresh_token_hash — VARBINARY(32) — NOT NULL — SHA-256. 원문 토큰은 저장하지 않는다
  • device_name — VARCHAR(100)
  • ip_address — VARBINARY(16) — IPv4 4바이트 / IPv6 16바이트
  • refresh_expires_at — DATETIME(6) — NOT NULL
  • last_used_at — DATETIME(6)
  • revoked_at — DATETIME(6)
  • revoke_reason — VARCHAR(255) — LOGOUT, WITHDRAWN, SECURITY, EXPIRED
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL

error_reports

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — NOT NULL
  • error_code — VARCHAR(50) — NOT NULL
  • error_type — VARCHAR(30) — NOT NULL
  • screen_id — VARCHAR(50) — NOT NULL
  • occurred_at — DATETIME(6) — NOT NULL
  • app_version — VARCHAR(30) — NOT NULL
  • problem_type — VARCHAR(50) — NOT NULL
  • detail — VARCHAR(500) — NOT NULL
  • created_at — DATETIME(6) — NOT NULL

friends

  • id — BIGINT — Primary key — NOT NULL
  • owner_user_id — BIGINT — NOT NULL
  • friend_user_id — BIGINT — NOT NULL
  • is_favorite — TINYINT(1) — NOT NULL

gift_products

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — NOT NULL — 추천 대상(친구)의 사용자 ID
  • product_id — BIGINT — Foreign key → products.id — NOT NULL
  • score — DECIMAL(8, 6) — NOT NULL
  • reason — VARCHAR(500)
  • taste_keywords — JSON
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL

personal_products

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — NOT NULL
  • product_id — BIGINT — Foreign key → products.id — NOT NULL
  • score — DECIMAL(8, 6) — NOT NULL
  • reason — VARCHAR(500)
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL

products

  • id — BIGINT — Primary key — NOT NULL
  • external_id — VARCHAR(255)
  • name — VARCHAR(300) — NOT NULL
  • category — VARCHAR(100)
  • description — TEXT
  • price — DECIMAL(12, 2)
  • image_url — VARCHAR(2048)
  • seller_name — VARCHAR(200)
  • purchase_url — VARCHAR(2048)
  • status — VARCHAR(20) — NOT NULL — ACTIVE, SOLD_OUT, UNAVAILABLE
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL
  • deleted_at — DATETIME(6)

taste_analyses

  • room_id — BIGINT — Primary key — NOT NULL — ai_chat_rooms.id
  • status — VARCHAR(20) — NOT NULL — QUEUED, RUNNING, SUCCEEDED, FAILED
  • progress — INT — NOT NULL
  • progress_message — VARCHAR(255)
  • candidate_result — TEXT
  • decision — VARCHAR(20) — NOT NULL — PENDING, ACCEPTED, REJECTED
  • completed_at — DATETIME(6)
  • decided_at — DATETIME(6)
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL

user_taste_profiles

  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • recent_tastes — TEXT
  • recent_interests — TEXT
  • ai_summary — TEXT
  • onboarding_tastes — JSON — NOT NULL
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL

users

  • id — BIGINT — Primary key — NOT NULL
  • external_id — BIGINT — 카카오 회원번호
  • nickname — VARCHAR(50) — NOT NULL
  • profile_image_url — VARCHAR(2048)
  • gender — VARCHAR(255) — NOT NULL — MALE, FEMALE, NONE
  • birth_date — DATE
  • onboarding_completed — TINYINT(1) — NOT NULL
  • taste_analysis_completed — TINYINT(1) — NOT NULL
  • status — VARCHAR(30) — NOT NULL — ONBOARDING, ACTIVE, BLOCKED, WITHDRAWN
  • blocked_at — DATETIME(6)
  • last_login_at — DATETIME(6)
  • kakao_friend_synced_at — DATETIME(6)
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL
  • deleted_at — DATETIME(6)