abcabc

Tables (8)

chat_messages

  • message_id — BIGINT
  • room_id — BIGINT — NOT NULL
  • sender_id — BIGINT — NOT NULL
  • message_text — TEXT
  • sent_at — DATETIME

chat_rooms

  • room_id — BIGINT
  • group_id — BIGINT — NOT NULL
  • room_name — VARCHAR(100)
  • created_at — DATETIME

comments

  • comment_id — BIGINT
  • post_type — ENUM('post', 'gpost') — NOT NULL
  • post_id — BIGINT — NOT NULL
  • author_id — BIGINT — NOT NULL
  • content — TEXT
  • created_at — DATETIME

group_members

  • group_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Primary key — NOT NULL
  • joined_at — DATETIME
  • role — ENUM('leader', 'member')

group_posts

  • gpost_id — BIGINT
  • group_id — BIGINT — NOT NULL
  • author_id — BIGINT — NOT NULL
  • title — VARCHAR(150) — NOT NULL
  • content — MEDIUMTEXT
  • created_at — DATETIME

groups

  • group_id — BIGINT
  • group_name — VARCHAR(100) — NOT NULL
  • description — TEXT
  • category — VARCHAR(50)
  • is_online — BOOLEAN
  • created_by — BIGINT — NOT NULL
  • created_at — DATETIME

posts

  • post_id — BIGINT
  • title — VARCHAR(150) — NOT NULL
  • content — MEDIUMTEXT
  • category — VARCHAR(50)
  • author_id — BIGINT — NOT NULL
  • group_id — BIGINT
  • created_at — DATETIME
  • updated_at — DATETIME

users

  • user_id — BIGINT
  • username — VARCHAR(50) — NOT NULL
  • email — VARCHAR(100) — NOT NULL
  • password_hash — CHAR(60) — NOT NULL
  • profile_image — VARCHAR(255)
  • bio — TEXT
  • joined_at — DATETIME