logineth

Tables (5)

chat_model (ChatModel)

  • Primary ID (id) — auto_increment — Primary key — NOT NULL — Auto increment
  • Created date (created_at) — created_at — Auto created date
  • Updated date (updated_at) — created_at — Auto updated date
  • Content (content)
  • User (userModelId) — Foreign key → user_model.Primary ID — NOT NULL — Auto increment
  • Room (roomModelId) — auto_increment — Foreign key → room_model.Primary ID — NOT NULL — Auto increment

follow_model

  • Follower ID (userModelId_1) — Foreign key → user_model.Primary ID — NOT NULL — Auto increment
  • Following ID (userModelId_2) — Foreign key → user_model.Primary ID — NOT NULL — Auto increment

room_model (RoomModel)

  • Primary ID (id) — auto_increment — Primary key — NOT NULL — Auto increment
  • Created date (created_at) — created_at — Auto created date
  • Updated date (updated_at) — created_at — Auto updated date
  • Room name (name) — Unique
  • Chats (chats) — One to many
  • Users (users) — Many to many
  • View users (viewUsers) — Many to many

user_model (UserModel)

  • Primary ID (id) — Primary key — NOT NULL — Auto increment
  • Created date (created_at) — Auto created date
  • Updated date (updated_at) — Auto updated date
  • Username (username) — Over 1
  • Password (password) — Over 8
  • Nickname (nickname) — Over 1, under 10
  • Image (image) — Nullable
  • Bio (bio) — Nullable
  • Role (role) — Enum Role
  • Provider (provider) — Enum Provider
  • Followers (followerUsers) — Many to many
  • Followings (followingUsers) — Many to many
  • Chats (chats) — One to many
  • Rooms (rooms) — Many to many

user_room_model

  • User ID (userModelId) — Foreign key → user_model.Primary ID — NOT NULL — Auto increment
  • Room ID (roomModelId) — auto_increment — Foreign key → room_model.Primary ID — NOT NULL — Auto increment