s1

Tables (8)

channelchats

  • id — int — Primary key — NOT NULL
  • content — text — NOT NULL
  • createdAt — datetime(6) — NOT NULL
  • updatedAt — datetime(6) — NOT NULL
  • UserId — int — Foreign key → users.id
  • ChannelId — int — Foreign key → channels.id

channelmembers

  • ChannelId — int — Primary key — NOT NULL
  • UserId — int — Foreign key → users.id — NOT NULL
  • createdAt — datetime(6) — NOT NULL
  • updatedAt — datetime(6) — NOT NULL

channels

  • id — int — Primary key — NOT NULL
  • name — varchar(30) — NOT NULL
  • private — tinyint(1)
  • createdAt — datetime(6) — NOT NULL
  • updatedAt — datetime(6) — NOT NULL
  • WorkspaceId — int — Foreign key → workspaces.id

dms

  • id — int — Primary key — NOT NULL
  • content — text — NOT NULL
  • createdAt — datetime(6) — NOT NULL
  • updatedAt — datetime(6) — NOT NULL
  • WorkspaceId — int — Foreign key → workspaces.id
  • SenderId — int — Foreign key → users.id
  • ReceiverId — int — Foreign key → users.id

mentions

  • id — int — Primary key — NOT NULL
  • category — enum('chat','dm','system') — NOT NULL
  • ChatId — int
  • createdAt — datetime(6) — NOT NULL
  • updatedAt — datetime(6) — NOT NULL
  • WorkspaceId — int — Foreign key → workspaces.id
  • SenderId — int — Foreign key → users.id
  • ReceiverId — int — Foreign key → users.id

users

  • id — int — Primary key — NOT NULL
  • email — varchar(30) — NOT NULL
  • nickname — varchar(30) — NOT NULL
  • password — varchar(100) — NOT NULL
  • createdAt — datetime(6) — NOT NULL
  • updatedAt — datetime(6) — NOT NULL
  • deletedAt — datetime(6)

workspacemembers

  • WorkspaceId — int — Primary key — NOT NULL
  • UserId — int — Foreign key → users.id — NOT NULL
  • createdAt — datetime(6) — NOT NULL
  • updatedAt — datetime(6) — NOT NULL
  • loggedInAt — datetime

workspaces

  • id — int — Primary key — NOT NULL
  • name — varchar(30) — NOT NULL
  • url — varchar(30) — NOT NULL
  • createdAt — datetime(6) — NOT NULL
  • updatedAt — datetime(6) — NOT NULL
  • deletedAt — datetime(6)
  • OwnerId — int — Foreign key → users.id