Emotion

Tables (15)

bad_word

  • id — INT
  • word — VARCHAR(255) — NOT NULL — 비속어 단어

boards

  • id — INT
  • emotion_category — ENUM('ANGER', 'SADNESS', 'JOY', 'ANXIETY') — NOT NULL — 감정 분류

chatbot_message

  • id — INT
  • session_id — INT — NOT NULL
  • sender — ENUM('USER', 'BOT') — NOT NULL
  • message — TEXT — NOT NULL
  • created_at — TIMESTAMP

chatbot_session

  • id — INT
  • user_id — INT — NOT NULL
  • persona_id — INT — 추후 페르소나 기능 확장 시 사용 가능
  • started_at — TIMESTAMP
  • ended_at — TIMESTAMP

comments

  • id — INT
  • post_id — INT — NOT NULL
  • user_id — INT — NOT NULL
  • content — TEXT — NOT NULL
  • anon_id — VARCHAR(50)
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP

emotion_analyses

  • id — INT
  • sadness_score — FLOAT
  • anxiety_score — FLOAT
  • anger_score — FLOAT
  • joy_score — FLOAT
  • other_emotion_scores — JSON
  • model_used — VARCHAR(50)
  • analyzed_at — TIMESTAMP

penalty_log

  • id — INT
  • users_id — INT — NOT NULL
  • target_type — ENUM('post', 'comment') — NOT NULL
  • orginal_content — TEXT — NOT NULL
  • detected_words — TEXT

phq9_tests

  • id — INT
  • user_id — INT — NOT NULL
  • total_score — INT — NOT NULL
  • scenario_level — INT — NOT NULL — 점수 기반 시나리오 단계 (1~4)
  • taken_at — TIMESTAMP

phq_answers

  • id — INT
  • phq9_id — INT — NOT NULL
  • question_number — INT — NOT NULL
  • answer_ — INT — NOT NULL — 0~3점 사이의 응답값

posts

  • id — INT
  • board_id — INT — NOT NULL
  • user_id — INT — NOT NULL
  • content — TEXT — NOT NULL
  • anon_id — VARCHAR(50)
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP

reaction_types

  • id — INT
  • reaction_type — ENUM('GOOD', 'BAD') — NOT NULL — 반응 종류
  • icon — VARCHAR(100) — 아이콘 경로

reactions

  • id — INT
  • user_id — INT — NOT NULL
  • target_type — ENUM('posts', 'comments') — NOT NULL — 대상 유형
  • target_id — INT — NOT NULL — 게시글 또는 댓글 ID
  • reaction_type_id — INT — NOT NULL
  • created_at — TIMESTAMP

reputation_log

  • id — INT
  • user_id — INT — NOT NULL
  • target_id — INT — NOT NULL
  • reaction_type — ENUM('LIKE', 'DISLIKE') — NOT NULL
  • change_score — INT

reputation_system

  • id — INT
  • users_id — INT — NOT NULL
  • reputation_score — INT
  • reputation_level — ENUM('BLACK', 'NAVY', 'BLUE', 'SKYBLUE', 'WHITE')
  • reputation_img — VARCHAR(255)

users

  • id — INT
  • username — VARCHAR(50) — NOT NULL — 닉네임
  • user_login — VARCHAR(50) — NOT NULL — 로그인용 ID
  • age — INT — 나이
  • sex — VARCHAR(50) — 성별
  • password — VARCHAR(255) — NOT NULL — 암호화된 비밀번호
  • role — ENUM('USER', 'ADMIN') — 역할
  • states — ENUM('ACTIVE', 'BANNED') — 계정 상태