TEST2

Tables (9)

attachments

  • attachment_id — BIGINT
  • post_id — BIGINT — Foreign key → posts.post_id — NOT NULL
  • original_name — VARCHAR(255) — NOT NULL
  • stored_name — VARCHAR(255) — NOT NULL
  • file_path — VARCHAR(500) — NOT NULL
  • file_size — BIGINT — NOT NULL
  • created_at — DATETIME — NOT NULL

boards

  • board_id — BIGINT
  • board_name — VARCHAR(100) — NOT NULL
  • board_description — VARCHAR(255)
  • is_active — INT — NOT NULL
  • created_at — DATETIME — NOT NULL

comment_reactions

  • reaction_id — BIGINT
  • comment_id — BIGINT — Foreign key → comments.comment_id — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • reaction_type — VARCHAR(20) — NOT NULL
  • created_at — DATETIME — NOT NULL

comments

  • comment_id — BIGINT
  • post_id — BIGINT — Foreign key → posts.post_id — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • parent_comment_id — BIGINT — Foreign key → comments.comment_id
  • content — TEXT — NOT NULL
  • like_count — INT — NOT NULL
  • dislike_count — INT — NOT NULL
  • is_deleted — INT — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

post_reactions

  • reaction_id — BIGINT
  • post_id — BIGINT — Foreign key → posts.post_id — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • reaction_type — VARCHAR(20) — NOT NULL
  • created_at — DATETIME — NOT NULL

posts

  • post_id — BIGINT
  • board_id — BIGINT — Foreign key → boards.board_id — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • title — VARCHAR(200) — NOT NULL
  • content — TEXT — NOT NULL
  • view_count — INT — NOT NULL
  • like_count — INT — NOT NULL
  • dislike_count — INT — NOT NULL
  • comment_count — INT — NOT NULL
  • is_notice — INT — NOT NULL
  • is_deleted — INT — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

refresh_tokens

  • refresh_token_id — BIGINT
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • refresh_token — VARCHAR(500) — NOT NULL
  • expires_at — DATETIME — NOT NULL
  • created_at — DATETIME — NOT NULL

reports

  • report_id — BIGINT
  • reporter_user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • target_user_id — BIGINT — Foreign key → users.user_id
  • post_id — BIGINT — Foreign key → posts.post_id
  • comment_id — BIGINT — Foreign key → comments.comment_id
  • reason — VARCHAR(255) — NOT NULL
  • created_at — DATETIME — NOT NULL

users

  • user_id — BIGINT
  • login_id — VARCHAR(50) — NOT NULL
  • password — VARCHAR(255) — NOT NULL
  • nickname — VARCHAR(50) — NOT NULL
  • email — VARCHAR(100)
  • role — VARCHAR(20) — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • profile_image_url — VARCHAR(500)
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL