MkChat
Tables (5)
Account (유저 정보)
- ID (고유번호) — NOT NULL — Primary key — NOT NULL
- email (이메일) — NOT NULL, UNIQUE
- password (비밀번호) — NOT NULL
- phone (휴대폰 번호) — NOT NULL
- image_context (이미지경로) — NULL
- created_at (가입 시기) — NOT NULL
- updated_at (정보변경시기)
- withdrawal_at (탈퇴 시기)
Account_Roles (유저 권한)
- ID (고유번호) — NOT NULL — Primary key — NOT NULL
- account_id (유저 고유번호 외래키) — NOT NULL — Foreign key → Account.ID — NOT NULL
- role (권한) — NOT NULL
account_group (채팅방 (접속자, 접속시기, 떠남시기등))
- ID (고유번호) — NOT NULL — Primary key — NOT NULL
- conversation_id (매개 테이블 외래키) — NOT NULL — Foreign key → conversation.ID — NOT NULL
- account_id (고객아이디) — NOT NULL — Foreign key → Account.ID — NOT NULL
- created_at (방생성시기) — NOT NULL
- leaved_at (방나간시기) — Null
conversation (메세지 <-> 채팅방 중간매개 테이블)
- ID (고유번호) — NOT NULL — Primary key — NOT NULL
- name (채팅방 이름) — NotNull
message (메세지)
- ID (고유번호) — NOT NULL — Primary key — NOT NULL
- conversation_id (매개 테이블 외래키) — NOT NULL — Foreign key → conversation.ID — NOT NULL
- created_by_id (발신자) — NOT NULL — Foreign key → Account.ID — NOT NULL
- content (내용) — NOT NULL
- created_at (메시지 전송날짜) — NOT NULL
- type (이미지 등 미디어 타입) — NOT NULL
- is_read (읽음 여부) — NOT NULL