StepByStep

Tables (4)

comments

  • id — BIGINT — Primary key — NOT NULL
  • post_id — BIGINT — Foreign key → posts.id — NOT NULL
  • author_user_id — BIGINT — Foreign key → users.id — NOT NULL
  • content — TEXT — NOT NULL
  • status — ENUM('ACTIVE','DELETED') — NOT NULL
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL

post_likes

  • post_id — BIGINT — Foreign key → posts.id — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL

posts

  • id — BIGINT — Primary key — NOT NULL
  • author_user_id — BIGINT — Foreign key → users.id — NOT NULL
  • content — TEXT — NOT NULL
  • comments_count — INT — NOT NULL
  • likes_count — INT — NOT NULL
  • status — ENUM('ACTIVE','DELETED') — NOT NULL
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL

users

  • id — BIGINT — Primary key — NOT NULL
  • login_id — VARCHAR(20) — NOT NULL
  • password_hash — VARCHAR(60) — NOT NULL
  • nickname — VARCHAR(50) — NOT NULL
  • gender — ENUM('F','M') — NOT NULL
  • birthyear — SMALLINT — NOT NULL
  • status — ENUM('ACTIVE','DELETED') — NOT NULL
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL