skala

Tables (14)

care_cost_estimates

  • estimate_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • checkup_id — BIGINT — Foreign key → health_checkups.checkup_id — REQ-FUNC-16 검진데이터 기반 계산
  • disease_type — VARCHAR(50) — 암/뇌혈관/치매 등
  • estimated_cost — DECIMAL(15, 2) — 예상 필요 간병비 (예: 4000만원)
  • age_range — VARCHAR(20) — 70~80대 등
  • created_at — DATETIME — NOT NULL

care_plans

  • plan_id — BIGINT — Primary key — NOT NULL
  • estimate_id — BIGINT — Foreign key → care_cost_estimates.estimate_id — NOT NULL — REQ-FUNC-17 간병비 대비 AI 플랜
  • recommended_product — VARCHAR(100) — 추천 금융상품/보험 등
  • plan_detail — TEXT
  • created_at — DATETIME — NOT NULL

child_approvals

  • approval_id — BIGINT — Primary key — NOT NULL
  • alert_id — BIGINT — Foreign key → fraud_alerts.alert_id — NOT NULL — REQ-FUNC-14 자녀 2차 안심확인
  • child_user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • status — ENUM('waiting', 'approved', 'rejected') — NOT NULL
  • requested_at — DATETIME — NOT NULL
  • responded_at — DATETIME

family_links

  • link_id — BIGINT — Primary key — NOT NULL
  • parent_user_id — BIGINT — Foreign key → users.user_id — NOT NULL — 부모님
  • child_user_id — BIGINT — Foreign key → users.user_id — NOT NULL — 자녀(보호자)
  • status — ENUM('pending', 'active', 'removed') — NOT NULL — REQ-FUNC-7,8
  • invited_at — DATETIME — NOT NULL
  • connected_at — DATETIME
  • removed_at — DATETIME

financial_accounts

  • account_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL — 부모님 - REQ-FUNC-9
  • institution — VARCHAR(100) — NOT NULL — 은행/증권/보험사명
  • account_type — ENUM('입출금', '예적금', '연금', '보험') — NOT NULL
  • account_no — VARCHAR(100) — 마스킹 저장 권장
  • balance — DECIMAL(15, 2) — NOT NULL
  • synced_at — DATETIME
  • created_at — DATETIME — NOT NULL

financial_products

  • product_id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • product_type — VARCHAR(30) — 예적금/연금/보험 등 - REQ-FUNC-24
  • description — TEXT

fraud_alerts

  • alert_id — BIGINT — Primary key — NOT NULL
  • transaction_id — BIGINT — Foreign key → transactions.transaction_id — NOT NULL — REQ-FUNC-12 이상거래탐지
  • reason — VARCHAR(255) — 고액송금/통화중송금/원격제어중/심야송금 등
  • hold_started_at — DATETIME — REQ-FUNC-13 10분 멈춤 시작
  • hold_minutes — INT — NOT NULL
  • ai_question_answer — VARCHAR(255) — AI 안심질문 응답
  • status — ENUM('pending', 'cleared', 'escalated') — NOT NULL
  • created_at — DATETIME — NOT NULL

health_checkups

  • checkup_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL — 부모님 - REQ-FUNC-10
  • checkup_date — DATE — NOT NULL
  • blood_pressure — VARCHAR(20)
  • blood_sugar — DECIMAL(6, 2)
  • cholesterol — DECIMAL(6, 2)
  • medication_note — TEXT — 복약 내역
  • source — VARCHAR(100) — NOT NULL
  • synced_at — DATETIME — NOT NULL

notifications

  • notification_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL — REQ-FUNC-20 알림내역보관함
  • type — VARCHAR(50) — 이상거래경고/자녀확인요청/승인결과 등
  • related_alert_id — BIGINT — Foreign key → fraud_alerts.alert_id
  • content — TEXT
  • is_read — TINYINT(1) — NOT NULL
  • created_at — DATETIME — NOT NULL

password_resets

  • reset_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • token — VARCHAR(255) — NOT NULL
  • expires_at — DATETIME — NOT NULL — REQ-FUNC-6 유효기간 30분
  • used_at — DATETIME
  • created_at — DATETIME — NOT NULL

product_subscriptions

  • subscription_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • product_id — BIGINT — Foreign key → financial_products.product_id — NOT NULL
  • subscribed_at — DATETIME — NOT NULL

transactions

  • transaction_id — BIGINT — Primary key — NOT NULL
  • account_id — BIGINT — Foreign key → financial_accounts.account_id — NOT NULL
  • amount — DECIMAL(15, 2) — NOT NULL
  • transaction_type — VARCHAR(30) — 이체/송금 - REQ-FUNC-23
  • channel — VARCHAR(50) — 앱/전화통화중/원격제어앱구동중 등 - REQ-FUNC-12
  • status — ENUM('requested', 'held', 'approved', 'completed', 'blocked') — NOT NULL
  • is_suspicious — TINYINT(1) — NOT NULL
  • requested_at — DATETIME — NOT NULL
  • completed_at — DATETIME

transfer_locks

  • lock_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL — REQ-FUNC-15 이체 잠금 해제
  • locked_at — DATETIME — NOT NULL
  • unlock_method — VARCHAR(50) — 본인신분증확인/상담원통화
  • unlocked_at — DATETIME

users

  • user_id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(50) — NOT NULL
  • phone_number — VARCHAR(20) — NOT NULL
  • email — VARCHAR(255)
  • password_hash — VARCHAR(255) — REQ-FUNC-3 일반로그인
  • role — ENUM('parent', 'child') — NOT NULL — parent=부모님, child=자녀(보호자) - REQ-FUNC-1
  • biometric_enabled — TINYINT(1) — NOT NULL — REQ-FUNC-2 생체로그인
  • login_keep_alive — TINYINT(1) — NOT NULL — 로그인 유지 기능
  • large_font_mode — TINYINT(1) — NOT NULL — REQ-FUNC-19 큰글씨 모드
  • status — ENUM('active', 'withdrawn') — NOT NULL — REQ-FUNC-5 탈퇴시 개인정보 즉시 삭제
  • created_at — DATETIME — NOT NULL
  • withdrawn_at — DATETIME