Chat
Tables (6)
ChatRoom (채팅방)
- 채팅방 ID (id) — BigInt — Primary key — NOT NULL
- 채팅방 이름 (name) — String
- 유저 수 (number_of_user) — int
- 생성 시간 (created_at) — CURRENT_TIMESTAMP
File (파일)
- 파일 ID (id) — BIGINT — Primary key — NOT NULL
- 업로더 (user_id) — Bigint — Foreign key → User.사용자 ID — NOT NULL
- 채팅방 ID (chatromm_id) — BigInt — Foreign key → ChatRoom.채팅방 ID — NOT NULL
- 파일 경로 (file_path) — String
Message (메시지)
- 메시지 ID (id) — Bigint — Primary key — NOT NULL
- 채팅방 ID (chatroom_id) — BigInt — Foreign key → ChatRoom.채팅방 ID — NOT NULL
- 메시지 작성자 (user_id) — Bigint — Foreign key → User.사용자 ID — NOT NULL
- 메시지 내용 (content) — String
- 메시지 전송 시간 (timestamp) — Datetime
- 메시지 읽음 여부 (is_read) — int
Notification (알람)
- 알림 ID (id) — Bigint — Primary key — NOT NULL
- 사용자 ID (user_id) — Bigint — Foreign key → User.사용자 ID — NOT NULL
- 알림 내용 (content) — String
- 알림 생성 시간 (timestmp) — Datetime
User (유저)
- 사용자 ID (id) — Bigint — Primary key — NOT NULL
- 유저이름 (username) — String
- 비밀번호 (password) — String
- 프로필 사진 (profilePicture) — String
- 현 상태(온라인/오프라인) (status) — Boolean
- 마지막 접속 시간 (last_seen) — DateTime
- 생성 시간 (created_at) — CURRENT_TIMESTAMP
User_ChatRoom (채팅방 참여 유저)
- 식별 ID (id) — Primary key — NOT NULL
- 사용자 ID (user_id) — Bigint — Foreign key → User.사용자 ID — NOT NULL
- 채팅방 ID (chatroom_id) — Bigint — Foreign key → ChatRoom.채팅방 ID — NOT NULL