Alrebaba v2 by djadpfa1002
Tables (16)
algorithms (알고리즘)
- algorithm_id (알고리즘 ID) — BIGINT — Primary key — NOT NULL
- algorithm_name (알고리즘 유형) — VARCHAR — NOT NULL — implementation, greedy, string 등등
- created_at (등록 시각) — TIMESTAMP — NOT NULL
channel_messages (채널에서 채팅 메세지)
- channel_message_id (채널 채팅 ID) — BIGINT — Primary key — NOT NULL
- channel_id (메세지가 속한 채널 ID) — BIGINT — Foreign key → channels.channel_id — NOT NULL — 공지사항, 소통, 피드백 등
- message_type (메세지 유형) — VARCHAR — NOT NULL — [TEXT, IMAGE]
- content (메세지 내용) — TEXT — NOT NULL — IMAGE 면 url 저장
- created_at (메세지 전송 시각) — TIMESTAMP — NOT NULL
- room_participant_id (방 참여 ID) — BIGINT — Foreign key → room_participants.room_participant_id — NOT NULL — 방에 참여한 참가자가 작성한 메세지인지 확인용(sender_id)
channels (채널)
- channel_id (채널 ID) — BIGINT — Primary key — NOT NULL
- room_id (채널이 속한 방 ID) — BIGINT — Foreign key → rooms(studies).room_id — NOT NULL
- channel_name (채널 이름) — VARCHAR — NOT NULL
- channel_type (채널 유형) — VARCHAR — NOT NULL — [NOTICE, CHAT, ... ]
- created_at (채널 생성 시각) — TIMESTAMP — NOT NULL
chat_messages (채팅 메세지)
- chat_message_id (채팅방 메세지 ID) — BIGINT — Primary key — NOT NULL
- message_type (메세지 유형) — VARCHAR — NOT NULL — [TEXT, IMAGE]
- content (메세지 내용) — TEXT — NOT NULL — IMAGE 면 url 저장
- created_at (메세지 전송 시각) — TIMESTAMP — NOT NULL
- member_id (회원 ID2) — BIGINT — Foreign key → chat_participants.member_id — NOT NULL
- chat_id (채팅방 ID2) — BIGINT — Foreign key → chat_participants.chat_id — NOT NULL
chat_participants (채팅방 참가자)
- member_id (회원 ID2) — BIGINT — Foreign key → members.member_id — NOT NULL
- chat_id (채팅방 ID2) — BIGINT — Foreign key → chats.chat_id — NOT NULL
- joined_at (채팅방 참가한 시각) — TIMESTAMP — NOT NULL
chats (채팅방)
- chat_id (채팅방 ID) — BIGINT — Primary key — NOT NULL
- chat_name (채팅방 이름) — VARCHAR — NOT NULL — 기본값: 참가자 목록
- created_at (채팅 생성 시각) — TIMESTAMP — NOT NULL
code_algorithms (코드에 사용된 알고리즘)
- algorithm_id (알고리즘 ID) — BIGINT — Foreign key → algorithms.algorithm_id — NOT NULL
- code_id (코드 ID) — BIGINT — Foreign key → codes.code_id — NOT NULL
- created_at (등록 시각) — TIMESTAMP — NOT NULL
codes (코드)
- code_id (코드 ID) — BIGINT — Primary key — NOT NULL
- channel_id (채널 ID) — BIGINT — Foreign key → channels.channel_id — NOT NULL
- source (문제 출처) — VARCHAR — NOT NULL — [BOJ, Programmers, SWEA, LeetCode, CodeTree, .. ]
- language_id (프로그래밍 언어 ID) — BIGINT — Foreign key → languages.language_id — NOT NULL
- title (문제 제목) — VARCHAR — NOT NULL
- contemt (코드 내용) — TEXT — NOT NULL
- created_at (코드 생성 시각) — TIMESTAMP — NOT NULL
- room_participant_id (방 참여 ID) — BIGINT — Foreign key → room_participants.room_participant_id — NOT NULL — 방에 참여한 참가자가 작성한 코드인지 확인용(auther_id)
events (일정)
- event_id (일정 ID) — BIGINT — Primary key — NOT NULL
- room_id (방 ID) — BIGINT — Foreign key → rooms(studies).room_id — NOT NULL
- event_name (일정 이름) — VARCHAR — NOT NULL
- description (일정 설명) — VARCHAR
- start_time (일정 시작 시각) — TIMESTAMP — NOT NULL
- end_time (일정 종료 시각) — TIMESTAMP — NOT NULL
- remind_before (알림 시간) — BIGINT — 시작하기 몇 분 전에 알림을 보낼지 지정
- created_at (일정 생성 시각) — TIMESTAMP — NOT NULL
- room_participant_id (방 참여 ID) — BIGINT — Foreign key → room_participants.room_participant_id — NOT NULL — 방에 참여한 참가자가 작성한 일정인지 확인용(created_by)
interests (관심사)
- interest_id (관심사 ID) — BIGINT — Primary key — NOT NULL
- interest_name (관심사) — VARCHAR — NOT NULL — 금융, 제조, 이커머스 등등
- created_at (등록 시각) — TIMESTAMP — NOT NULL
languages (프로그래밍 언어)
- language_id (프로그래밍 언어 ID) — BIGINT — Primary key — NOT NULL
- language_name (프로그래밍 언어 이름) — VARCHAR — NOT NULL
- created_at (등록 시각) — TIMESTAMP — NOT NULL
member_interests (회원의 관심사)
- member_interest_id (회원 관심사 ID) — BIGINT — Primary key — NOT NULL
- member_id (회원 ID) — BIGINT — Foreign key → members.member_id
- interest_id (관심사 ID) — BIGINT — Foreign key → interests.interest_id
- created_at (등록 시각) — TIMESTAMP — NOT NULL
member_languages (회원의 프로그래밍 언어)
- member_language_id (회원 프로그래밍 언어 ID) — BIGINT — Primary key — NOT NULL
- member_id (회원 ID) — BIGINT — Foreign key → members.member_id
- language_id (프로그래밍 언어 ID) — BIGINT — Foreign key → languages.language_id
- is_primary (주 언어 여부) — TINYINT(1) — NOT NULL
- created_at (등록 시각) — TIMESTAMP — NOT NULL
members (회원)
- member_id (회원 ID) — BIGINT — Primary key — NOT NULL
- username (이메일) — VARCHAR — 카카오 로그인 시 이메일 선택사항
- password (비밀번호) — VARCHAR — 카카오 로그인 시 비밀번호 미제공
- nickname (닉네임) — VARCHAR — NOT NULL — 닉네임 중복 불가
- role (역할) — VARCHAR — NOT NULL — [USER, ADMIN]
- status (회원 상태) — NOT NULL — [ONLINE, BUSY, DO_NOT_DISTURB, OFFLINE]
- profile_image (프로필 이미지 url) — TEXT — NOT NULL — 기본값: Default 이미지 제공
- created_at (계정 생성 시각) — TIMESTAMP — NOT NULL
- updated_at (계정 정보 최종 수정 시각) — TIMESTAMP — NOT NULL
room_participants (방 참가자)
- room_participant_id (방 참여 ID) — BIGINT — Primary key — NOT NULL
- member_id (회원 ID) — BIGINT — Foreign key → members.member_id
- room_id (방 ID) — BIGINT — Foreign key → rooms(studies).room_id — NOT NULL
- paritipant_role (방 참여자 역할) — VARCHAR — NOT NULL — [HOST, PARTICIPANT]
- joined_at (방에 참여한 시각) — TIMESTAMP — NOT NULL
rooms(studies) (방)
- room_id (방 ID) — BIGINT — Primary key — NOT NULL
- room_name (방 이름) — VARCHAR — NOT NULL
- logo_image (방 로고 이미지 url) — TEXT
- created_at (방 생성 시각) — TIMESTAMP — NOT NULL