Chatting-Server

Tables (6)

chat (채팅)

  • chat_id (Key) — BIGINT — Primary key — NOT NULL
  • message (메시지) — VARCHAR
  • send_at (송/수신시간) — TIMESTAMP
  • cr_id (Key2) — BIGINT — Foreign key → chat_room.cr_id — NOT NULL
  • user_id (Key3) — BIGINT — Foreign key → user.user_id — NOT NULL

chat_room (채팅방)

  • cr_id (Key) — BIGINT — Primary key — NOT NULL
  • close_at (종료날짜) — TIMESTAMP
  • create_at (생성날짜) — TIMESTAMP
  • name (채팅방명) — VARCHAR

chat_room_member (채팅참가자)

  • crm_id (Key) — BIGINT — Primary key — NOT NULL
  • joind_at (참가시간) — TIMESTAMP
  • role (권한) — ENUM
  • user_id (Key2) — BIGINT — Foreign key → user.user_id — NOT NULL
  • cr_id (Key3) — BIGINT — Foreign key → chat_room.cr_id — NOT NULL

friend (친구상태)

  • friend_id (Key) — BIGINT — Primary key — NOT NULL
  • friend_status (상태) — ENUM
  • requested_at (요청시간) — TIMESTAMP
  • updated_at (업데이트시간) — TIMESTAMP
  • user_id (accept_t_id) — BIGINT — Foreign key → user.user_id — NOT NULL
  • user_id (requester_t_id) — BIGINT — Foreign key → user.user_id — NOT NULL

user (사용자)

  • user_id (Key) — BIGINT — Primary key — NOT NULL
  • created_at (가입날짜) — TIMESTAMP
  • name (사용자명) — VARCHAR
  • role (권한) — ENUM

user_credentials (사용자비번)

  • user_id (Key) — BIGINT — Foreign key → user.user_id — NOT NULL
  • hashed_password (비밀번호) — VARCHAR