discodeit 최신화

테이블 (7)

binary_contents

  • bcId (id) — uuid — 기본 키 — NOT NULL
  • 생성일 (created_at) — timestamptz — NOT NULL
  • 파일이름 (file_name) — varchar(255) — NOT NULL
  • 크기 (size) — bigint — NOT NULL
  • 타입 (content_type) — varchar(100) — NOT NULL
  • 상태 (status) — varchar(20) — NOT NULL
  • 수정시간 (updated_at) — timestamptz

channels

  • channelId (id) — uuid — 기본 키 — NOT NULL
  • 생성일 (created_at) — timestamptz — NOT NULL
  • 업데이트일 (updated_at) — timestamptz
  • 채널이름 (name) — varchar(100) — NOT NULL
  • 설명 (description) — varchar(500)
  • 타입 (type) — varchar(10) — NOT NULL

message_attachments

  • bcId (attachment_id) — uuid — 외래 키 → binary_contents.bcId — NOT NULL
  • uuid (message_id) — uuid — 외래 키 → messages.messagesId — NOT NULL

messages

  • messagesId (id) — uuid — 기본 키 — NOT NULL
  • 생성일 (created_at) — timestamptz — NOT NULL
  • 업데이트일 (updated_at) — timestamptz
  • 내용 (content) — text
  • authorId (author_id) — uuid — 외래 키 → users.userId
  • channelId (channel_id) — uuid — 외래 키 → channels.channelId — NOT NULL

notifications

  • 알림Id (id) — uuid — 기본 키 — NOT NULL
  • 제목 (title) — varchar(255) — NOT NULL
  • 내용 (content) — text — NOT NULL
  • 생성시간 (created_at) — timestamptz — NOT NULL
  • 수신인Id (receiver_id) — uuid — 외래 키 → users.userId — NOT NULL

read_statuses

  • rsId (id) — uuid — 기본 키 — NOT NULL
  • 생성일 (created_at) — timestamptz — NOT NULL
  • 업데이트일 (updated_at) — timestamptz
  • 마지막읽은시간 (last_read_at) — timestamptz — NOT NULL
  • 알림 설정 (notification_enabled) — boolean — NOT NULL
  • userId (user_id) — uuid — 외래 키 → users.userId — NOT NULL
  • channelId (channel_id) — uuid — 외래 키 → channels.channelId — NOT NULL

users

  • userId (id) — uuid — 기본 키 — NOT NULL
  • 생성일 (created_at) — timestamptz — NOT NULL
  • 업데이트일 (updated_at) — timestamptz
  • 로그인아이디 (username) — varchar(50) — NOT NULL
  • 이메일 (email) — varchar(100) — NOT NULL
  • 비밀번호 (password) — varchar(60) — NOT NULL
  • 닉네임 (default_nickname) — varchar(30) — NOT NULL
  • 역할 (role) — varchar(20) — NOT NULL
  • profileId (profile_id) — uuid — 외래 키 → binary_contents.bcId