myMentalCare
Tables (5)
ai_chat_room_summaries
- id — BIGINT — Primary key — NOT NULL
- room_id — BIGINT — Foreign key → ai_chat_rooms.id — NOT NULL
- member_id — BIGINT — Foreign key → members.id — NOT NULL
- last_summarized_message_id — BIGINT — Foreign key → chat_messages.id
- summary — TEXT — NOT NULL
- emotional_state — VARCHAR(500)
- active_topics — TEXT
- unresolved_questions — TEXT
- user_preferences — TEXT
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
- INDEX — idx_ai_chat_room_summaries_member_room
ai_chat_rooms
- id — BIGINT — Primary key — NOT NULL
- member_id — BIGINT — Foreign key → members.id — NOT NULL
- chatbot_code — VARCHAR(50) — NOT NULL
- conversation_date — DATE — NOT NULL
- status — VARCHAR(20) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
chat_messages
- id — BIGINT — Primary key — NOT NULL
- room_id — BIGINT — Foreign key → ai_chat_rooms.id — NOT NULL
- sender_type — VARCHAR(20) — NOT NULL
- content — TEXT — NOT NULL
- message_order — INT — NOT NULL
- is_crisis_detected — BOOLEAN — NOT NULL
- created_at — DATETIME — NOT NULL
crisis_detection_events
- id — BIGINT — Primary key — NOT NULL
- member_id — BIGINT — Foreign key → members.id — NOT NULL
- room_id — BIGINT — Foreign key → ai_chat_rooms.id — NOT NULL
- message_id — BIGINT — Foreign key → chat_messages.id — NOT NULL
- detected_keywords — VARCHAR(500) — NOT NULL
- risk_level — VARCHAR(20) — NOT NULL
- handled_action — VARCHAR(50) — NOT NULL
- created_at — DATETIME — NOT NULL
members
- id — BIGINT — Primary key — NOT NULL
- login_id — VARCHAR(20) — NOT NULL
- email — VARCHAR(255)
- password — VARCHAR(255) — NOT NULL
- name — VARCHAR(50) — NOT NULL
- phone — VARCHAR(30)
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL