A401
Tables (14)
community_room (커뮤니티 방)
- idx (고유 인덱스) — BIGINT — Primary key — NOT NULL
- users_idx (users 테이블의 Fk ( 방장 id)) — BIGINT — Foreign key → users.idx — NOT NULL
- host_monsters_idx (고유 인덱스2) — BIGINT — Foreign key → user_monsters.idx — NOT NULL
- community_type (커뮤니티 타입) — INT
- room_title (방 제목) — VARCHAR(100)
- password (비밀번호) — VARCHAR(100)
- is_private (비밀방 여부) — BOOLEAN
- room_detail (방 설명) — TEXT
- is_active (방 삭제 여부) — BOOLEAN
- created_at (생성일) — DATETIME
- updated_at (갱신일) — DATETIME
debate_messages (토론 대화 내용)
- idx (고유 인덱스) — BIGINT — Primary key — NOT NULL
- room_debate_idx (room_debate 테이블의 FK) — BIGINT — Foreign key → room_debate.idx — NOT NULL
- sender_monster_idx (user_monsters테이블의 FK(발언한 몬스터)) — BIGINT — Foreign key → user_monsters.idx — NOT NULL
- turn_number (턴 번호) — INT
- message_type (몬스터 자율발언 or 선택발언) — VARCHAR(20)
- content (발언/ 선택지 내용) — TEXT
- choice_options (선택지 3개 json저장) — JSONB
- selected_choice (선택된 번호 (1,2,3 중1개)) — INT
- references_message_idx (현재 테이블 FK(참조한 이전 message_idx)) — BIGINT
- sent_at (전송시간) — DATETIME
debate_result (토론 결과)
- idx (고유 인덱스) — BIGINT — Primary key — NOT NULL
- room_debate_idx (room_debate 테이블의 FK) — BIGINT — Foreign key → room_debate.idx — NOT NULL
- user_monsters_idx (user_monsters 테이블의 FK) — BIGINT — Foreign key → user_monsters.idx — NOT NULL
- logic_score (논리력) — INT
- delivery_score (전달력) — INT
- speed_score (속도) — INT
- avg_score (평점) — INT
- created_at (결과 생성 시각) — DATETIME
debate_topics (토론 주제)
- idx (고유인덱스) — BIGINT — Primary key — NOT NULL
- topic_title (토론 주제 ( a vs b)) — VARCHAR(100)
- position_a (주제 a측) — VARCHAR(100)
- position_b (주제 b측) — VARCHAR(100)
friend_requests (친구 요청 목록)
- idx (고유 인덱스) — Primary key — NOT NULL
- from_idx (users 테이블의 FK(요청을 보낸 사람)) — BIGINT — Foreign key → users.idx — NOT NULL
- to_idx (users 테이블의 FK(요청을 받은 사람)) — BIGINT — Foreign key → users.idx — NOT NULL
- acceptance (요청 수락 여부) — INT
- created_at (생성일) — DATETIIME
- updated_at (갱신일) — DATETIME
friends (친구 목록)
- idx (고유 인덱스) — BIGINT — Primary key — NOT NULL
- from_idx (users 테이블의 FK(요청을 보낸 사람)) — BIGINT — Foreign key → users.idx — NOT NULL
- to_idx (users 테이블의 FK(요청을 받은 사람)) — BIGINT — Foreign key → users.idx — NOT NULL
- created_at (생성일) — DATETIME
- updated_at (갱신일) — DATETIME
meeting_theme (소개팅 테마)
- idx (고유 인덱스) — BIGINT — Primary key — NOT NULL
- theme_name (테마 이름) — VARCHAR(20)
notifications (알림)
- Key (고유 인덱스) — BIGINT — Primary key — NOT NULL
- user_id (users 테이블의 FK) — BIGINT — Foreign key → users.idx — NOT NULL
- type (소켓 TYPE) — VARCHAR(64)
- payload (타입에 따라 필요한 데이터) — OID
- read (알림 읽었는지 안읽었는지) — BOOLEAN
- created_at (생성일) — DATETIME
personal_chat (사용자-챗봇 대화)
- idx (고유 인덱스) — BIGINT — Primary key — NOT NULL
- users_idx (users 테이블의 FK) — BIGINT — Foreign key → users.idx — NOT NULL
- user_monsters_idx (user_monsters 테이블의 FK) — BIGINT — Foreign key → user_monsters.idx — NOT NULL
- chat_date (캘린더 표기용 채팅한 날짜) — DATE
- message_count (주고받은 대화 쌍의 갯수) — INT
- created_at (대화 처음 시작 시간) — DATETIME
personal_chat_messages (사용자-챗봇 대화 내용)
- idx (고유 인덱스) — BIGINT — Primary key — NOT NULL
- personal_chat_idx (personal_chat 테이블의 FK) — BIGINT — Foreign key → personal_chat.idx — NOT NULL
- user_question (사용자의 질문) — TEXT
- bot_response (챗봇의 대답) — TEXT
- question_time (질문한 시각) — DATETIME
- response_time (챗봇의 대답 시각) — DATETIME
- ai_metadata (fastapi에서 받는 기타 정보들) — JSONB
- status (메세지 상태) — VARCHAR(20)
room_debate (토론방 설정)
- idx (고유 인덱스) — BIGINT — Primary key — NOT NULL
- commmunity_room_idx (community_room 테이블의 FK) — BIGINT — Foreign key → community_room.idx — NOT NULL
- debate_topic_idx (debate_topics 테이블의 FK) — BIGINT — Foreign key → debate_topics.idx — NOT NULL
- winner_monster_idx (user_monsters테이블의 FK(승자)) — BIGINT — Foreign key → user_monsters.idx — NOT NULL
- debate_mode (토론 방식 선택) — VARCHAR(100)
- topic_selection_type (주제 선택 타입(직접 / 랜덤)) — VARCHAR(100)
- host_position (방장 주장 포지션) — VARCHAR(100)
- current_turn (현재 진행중인 턴) — INT
- max_turns (최대 턴 수) — INT
- game_status (게임 상태) — VARCHAR(20)
- created_at (게임방 생성시간) — DATETIME
- finished_at (게임 종료 시간) — DATETIME
room_meeting (소개팅)
- idx (고유 인덱스) — BIGINT — Primary key — NOT NULL
- community_room_idx (community_room 테이블의 Fk) — BIGINT — Foreign key → community_room.idx — NOT NULL
- meeting_theme_idx (meeting_theme 테이블의 FK) — BIGINT — Foreign key → meeting_theme.idx — NOT NULL
- created_at (방생성시각) — DATETIME
- updated_at (수정 시각) — DATETIME
user_monsters (사용자 몬스터)
- idx (고유 인덱스) — BIGINT — Primary key — NOT NULL
- users_idx (users 테이블의 FK) — BIGINT — Foreign key → users.idx — NOT NULL
- monster_name (몬스터 이름) — VARCHAR(100)
- speech_style (챗봇 말투) — INT
- call_name (사용자 부를 호칭) — VARCHAR(100)
- is_repcharacter (대표 캐릭터) — BOOLEAN
- type (몬스터 타입) — INT
- level (몬스터 진화 단계) — INT
- affection (애정도) — BIGINT
- traits (특성(200자 제한)) — VARCHAR(500)
- wins (승리 횟수) — INT
- defeats (패배 횟수) — INT
- is_deleted (삭제 여부) — BOOLEAN
- deleted_at (삭제일) — DATETIME
- created_at (생성일) — DATETIME
- updated_at (갱신일) — DATETIME
users (유저 계정 정보)
- idx (고유 인덱스) — BIGINT — Primary key — NOT NULL
- username (아이디) — VARCHAR(50)
- password (비밀번호) — VARCHAR(200)
- nickname (닉네임) — VARCHAR(100)
- birth (생일) — DATE
- gender (성별) — INT
- image_url (프로필사진(s3 url)) — VARCHAR(1000)
- created_at (생성일) — DATETIME
- updated_at (갱신일) — DATETIME