Project

Tables (5)

comments

  • comment_id — INT — Primary key — NOT NULL
  • user_id — INT — Foreign key → users.user_id — NOT NULL
  • post_id — INT — Foreign key → posts.post_id — NOT NULL
  • content — VARCHAR(500) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL
  • deleted_at — TIMESTAMP

post_likes

  • user_id — INT — Foreign key → users.user_id — NOT NULL
  • post_id — INT — Foreign key → posts.post_id — NOT NULL
  • created_at — TIMESTAMP — NOT NULL

posts

  • post_id — INT — Primary key — NOT NULL
  • user_id — INT — Foreign key → users.user_id — NOT NULL
  • title — VARCHAR(26) — NOT NULL
  • content — VARCHAR(1500) — NOT NULL
  • view_count — INT — NOT NULL
  • like_count — INT — NOT NULL
  • comment_count — INT — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL
  • deleted_at — TIMESTAMP

stored_files

  • file_id — INT — Primary key — NOT NULL
  • user_id — INT — Foreign key → users.user_id
  • post_id — INT — Foreign key → posts.post_id
  • file_url — VARCHAR(255) — NOT NULL
  • is_active — BOOLEAN — NOT NULL
  • created_at — TIMESTAMP — NOT NULL

users

  • user_id — INT — Primary key — NOT NULL
  • email — VARCHAR(255) — NOT NULL
  • password — VARCHAR(255) — NOT NULL
  • nickname — VARCHAR(10) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL
  • deleted_at — TIMESTAMP