blog

Tables (7)

account

  • account_id — LONG — Primary key — NOT NULL — auto_increment
  • email — VARCHAR(255) — NOT NULL — unique
  • nickname — VARCHAR(50) — NOT NULL — 1~8자
  • password — VARCHAR(255) — NOT NULL — 16자 이상(영문, 숫자, 특수문자 포함)
  • bio — VARCHAR(255)
  • create_at — DATETYPE(6) — NOT NULL
  • update_at — DATETYPE(6)
  • status — VARCHAR(10) — NOT NULL

category

  • category_id — LONG — Primary key — NOT NULL
  • name — VARCHAR(50) — NOT NULL

comment

  • comment_id — LONG — Primary key — NOT NULL
  • post_id — LONG — Foreign key → post.post_id — NOT NULL
  • account_id — LONG — Foreign key → post.account_id — NOT NULL — auto_increment
  • content — VARCHAR(255)

comment_heart

  • comment_heart_id — LONG — Primary key — NOT NULL
  • comment_id — LONG — Foreign key → comment.comment_id — NOT NULL
  • post_id — LONG — Foreign key → comment.post_id — NOT NULL
  • account_id — LONG — Foreign key → comment.account_id — NOT NULL — auto_increment
  • created_at — DATETYPE(6) — NOT NULL
  • updated_at — DATETYPE(6) — NOT NULL

follow

  • follow_id — LONG — Primary key — NOT NULL — auto_increment
  • following_id — LONG — Foreign key → account.account_id — NOT NULL — FK
  • follower_id — LONG — FK
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL

post

  • post_id — LONG — Primary key — NOT NULL
  • account_id — LONG — Foreign key → account.account_id — NOT NULL — auto_increment
  • title — VARCHAR(50) — NOT NULL
  • content — VARCHAR(1000)
  • created_at — DATETYPE(6) — NOT NULL
  • updated_at — DATETYPE(6) — NOT NULL
  • category_id — LONG — Foreign key → category.category_id — NOT NULL

post_heart

  • heart_id — LONG — Primary key — NOT NULL
  • post_id — LONG — Foreign key → post.post_id — NOT NULL
  • account_id — LONG — Foreign key → post.account_id — NOT NULL — auto_increment
  • create_at — DATETYPE(6) — NOT NULL
  • update_at — DATETYPE(6) — NOT NULL