REBLOOM_3
Tables (25)
ai_insights
- id — BIGINT — Primary key — NOT NULL
- child_user_id — BIGINT — Foreign key → users.id — NOT NULL
- risk_event_id — BIGINT — Foreign key → risk_events.id
- insight_type — VARCHAR(20) — NOT NULL
- summary_text — TEXT — NOT NULL
- stress_factor — VARCHAR(255)
- recommended_focus — VARCHAR(255)
- generated_at — DATETIME — NOT NULL
auth_accounts
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- provider — VARCHAR(30) — NOT NULL
- provider_user_id — VARCHAR(255) — NOT NULL
- provider_email — VARCHAR(255)
- created_at — DATETIME — NOT NULL
biometric_permissions
- id — BIGINT — Primary key — NOT NULL
- child_user_id — BIGINT — Foreign key → users.id — NOT NULL
- device_id — BIGINT — Foreign key → devices.id — NOT NULL
- heart_rate_enabled — TINYINT(1) — NOT NULL
- hrv_enabled — TINYINT(1) — NOT NULL
- acc_enabled — TINYINT(1) — NOT NULL
- bvp_enabled — TINYINT(1) — NOT NULL
- sleep_enabled — TINYINT(1) — NOT NULL
- stress_enabled — TINYINT(1) — NOT NULL
- activity_enabled — TINYINT(1) — NOT NULL
- granted_at — DATETIME — NOT NULL
- revoked_at — DATETIME
biometric_records
- id — BIGINT — Primary key — NOT NULL
- child_user_id — BIGINT — Foreign key → users.id — NOT NULL
- device_id — BIGINT — Foreign key → devices.id — NOT NULL
- recorded_at — DATETIME — NOT NULL
- heart_rate_bpm — INT
- hrv_ms — DECIMAL(10,2)
- acc_x — DECIMAL(10,4)
- acc_y — DECIMAL(10,4)
- acc_z — DECIMAL(10,4)
- bvp — DECIMAL(10,4)
- stress_score — DECIMAL(10,2)
- sleep_minutes — INT
- activity_steps — INT
- raw_payload — TEXT
- created_at — DATETIME — NOT NULL
child_counselor_relations
- id — BIGINT — Primary key — NOT NULL
- child_user_id — BIGINT — Foreign key → users.id — NOT NULL
- counselor_user_id — BIGINT — Foreign key → users.id — NOT NULL
- status — VARCHAR(20) — NOT NULL
- started_at — DATETIME
- ended_at — DATETIME
child_current_statuses
- id — BIGINT — Primary key — NOT NULL
- child_user_id — BIGINT — Foreign key → users.id — NOT NULL
- latest_risk_event_id — BIGINT — Foreign key → risk_events.id
- current_risk_level — VARCHAR(20) — NOT NULL
- risk_score — DECIMAL(10,2)
- summary_message — VARCHAR(500)
- sleep_status — VARCHAR(20)
- activity_status — VARCHAR(20)
- stress_status — VARCHAR(20)
- updated_at — DATETIME — NOT NULL
child_devices
- id — BIGINT — Primary key — NOT NULL
- child_user_id — BIGINT — Foreign key → users.id — NOT NULL
- device_id — BIGINT — Foreign key → devices.id — NOT NULL
- paired_at — DATETIME — NOT NULL
- is_active — TINYINT(1) — NOT NULL
child_parent_relations
- id — BIGINT — Primary key — NOT NULL
- child_user_id — BIGINT — Foreign key → users.id — NOT NULL
- parent_user_id — BIGINT — Foreign key → users.id — NOT NULL
- relationship_type — VARCHAR(30) — NOT NULL
- status — VARCHAR(20) — NOT NULL
- is_primary — TINYINT(1) — NOT NULL
- created_at — DATETIME — NOT NULL
child_profiles
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- birth_date — DATE
- gender — VARCHAR(20)
- school_name — VARCHAR(100)
- grade — VARCHAR(30)
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
conversation_keywords
- id — BIGINT — Primary key — NOT NULL
- session_id — BIGINT — Foreign key → conversation_sessions.id — NOT NULL
- message_id — BIGINT — Foreign key → conversation_messages.id
- keyword — VARCHAR(100) — NOT NULL
- sentiment_type — VARCHAR(20) — NOT NULL
- score — DECIMAL(10,2)
- extracted_at — DATETIME — NOT NULL
conversation_messages
- id — BIGINT — Primary key — NOT NULL
- session_id — BIGINT — Foreign key → conversation_sessions.id — NOT NULL
- speaker_type — VARCHAR(20) — NOT NULL
- content — TEXT — NOT NULL
- sent_at — DATETIME — NOT NULL
conversation_sessions
- id — BIGINT — Primary key — NOT NULL
- child_user_id — BIGINT — Foreign key → users.id — NOT NULL
- device_id — BIGINT — Foreign key → devices.id
- started_at — DATETIME — NOT NULL
- ended_at — DATETIME
- session_summary — TEXT
- created_at — DATETIME — NOT NULL
counselor_profiles
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- real_name — VARCHAR(100) — NOT NULL
- organization_name — VARCHAR(150)
- phone_number — VARCHAR(30)
- specialty — VARCHAR(100)
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
counselor_todos
- id — BIGINT — Primary key — NOT NULL
- counselor_user_id — BIGINT — Foreign key → users.id — NOT NULL
- child_user_id — BIGINT — Foreign key → users.id
- title — VARCHAR(200) — NOT NULL
- description — TEXT
- start_at — DATETIME — NOT NULL
- end_at — DATETIME — NOT NULL
- meeting_url — VARCHAR(500)
- location — VARCHAR(255)
- status — VARCHAR(20) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
daily_health_summaries
- id — BIGINT — Primary key — NOT NULL
- child_user_id — BIGINT — Foreign key → users.id — NOT NULL
- summary_date — DATE — NOT NULL
- sleep_minutes — INT
- sleep_delta_minutes — INT
- avg_heart_rate_bpm — DECIMAL(10,2)
- avg_hrv_ms — DECIMAL(10,2)
- activity_steps — INT
- stress_score — DECIMAL(10,2)
- risk_level — VARCHAR(20)
- summary_message — VARCHAR(500)
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
devices
- id — BIGINT — Primary key — NOT NULL
- device_type — VARCHAR(30) — NOT NULL
- device_name — VARCHAR(100) — NOT NULL
- serial_number — VARCHAR(100)
- status — VARCHAR(20) — NOT NULL
- created_at — DATETIME — NOT NULL
diaries
- id — BIGINT — Primary key — NOT NULL
- child_user_id — BIGINT — Foreign key → users.id — NOT NULL
- title — VARCHAR(200)
- content — TEXT — NOT NULL
- emotion_tag — VARCHAR(50)
- mood_score — DECIMAL(10,2)
- written_date — DATE — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
- deleted_at — DATETIME
diary_share_settings
- id — BIGINT — Primary key — NOT NULL
- diary_id — BIGINT — Foreign key → diaries.id — NOT NULL
- share_with_counselor — TINYINT(1) — NOT NULL
- share_biometric_data — TINYINT(1) — NOT NULL
- share_conversation_metrics — TINYINT(1) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
observation_replies
- id — BIGINT — Primary key — NOT NULL
- observation_log_id — BIGINT — Foreign key → parent_observation_logs.id — NOT NULL
- counselor_user_id — BIGINT — Foreign key → users.id — NOT NULL
- content — TEXT — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
- deleted_at — DATETIME
parent_observation_logs
- id — BIGINT — Primary key — NOT NULL
- parent_user_id — BIGINT — Foreign key → users.id — NOT NULL
- child_user_id — BIGINT — Foreign key → users.id — NOT NULL
- content — TEXT — NOT NULL
- category_tag — VARCHAR(50)
- observed_at — DATETIME — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
- deleted_at — DATETIME
risk_events
- id — BIGINT — Primary key — NOT NULL
- child_user_id — BIGINT — Foreign key → users.id — NOT NULL
- risk_level — VARCHAR(20) — NOT NULL
- risk_type — VARCHAR(30) — NOT NULL
- risk_score — DECIMAL(10,2)
- detected_at — DATETIME — NOT NULL
- summary_message — VARCHAR(500) — NOT NULL
- evidence_summary — TEXT
- ai_comment — TEXT — EXT NUL
- status — VARCHAR(20) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
risk_notifications
- id — BIGINT — Primary key — NOT NULL
- risk_event_id — BIGINT — Foreign key → risk_events.id — NOT NULL
- recipient_user_id — BIGINT — Foreign key → users.id — NOT NULL
- channel — VARCHAR(20) — NOT NULL
- title — VARCHAR(200) — NOT NULL
- body — TEXT — NOT NULL
- sent_at — DATETIME
- read_at — DATETIME
- status — VARCHAR(20) — NOT NULL
user_push_tokens
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- device_platform — VARCHAR(20) — NOT NULL
- push_token — VARCHAR(500) — NOT NULL
- is_active — TINYINT(1) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
user_roles
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- role — VARCHAR(30) — NOT NULL
- created_at — DATETIME — NOT NULL
users
- id — BIGINT — Primary key — NOT NULL
- email — VARCHAR(255) — NOT NULL
- password_hash — VARCHAR(255)
- nickname — VARCHAR(100) — NOT NULL
- profile_image_url — VARCHAR(500)
- status — VARCHAR(20) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL