KTB-week06

Tables (5)

comment (댓글)

  • id (댓글ID) — bigint — Primary key — NOT NULL
  • post_id (게시글ID) — bigint — Foreign key → post.id — NOT NULL
  • account_id (작성자ID) — bigint — Foreign key → user_account.id — NOT NULL
  • content (내용) — text — NOT NULL
  • is_deleted (삭제 여부) — boolean — NOT NULL
  • created_at (작성일) — timestamp — NOT NULL
  • updated_at (수정일) — timestamp — NOT NULL
  • deleted_at (삭제일) — timestamp

post (게시글)

  • id (게시글ID) — bigint — Primary key — NOT NULL
  • account_id (작성자ID) — bigint — Foreign key → user_account.id — NOT NULL
  • title (제목) — varchar(26) — NOT NULL
  • content (본문) — longtext — NOT NULL
  • view_count (조회수) — bigint — NOT NULL
  • comemnt_count (댓글수) — bigint — NOT NULL
  • like_count (좋아요수) — bigint — NOT NULL
  • is_deleted (삭제 여부) — boolean — NOT NULL
  • created_at (작성일) — timestamp — NOT NULL
  • updated_at (수정일) — timestamp — NOT NULL
  • deleted_at (삭제일) — timestamp

post_image (게시글 이미지)

  • id (게시글 이미지ID) — bigint — Primary key — NOT NULL
  • post_id (게시글ID) — bigint — Foreign key → post.id — NOT NULL
  • image_url (이미지 경로) — varchar(255) — NOT NULL
  • image_name (이미지 이름) — varchar(255) — NOT NULL
  • created_at (생성일) — timestamp — NOT NULL

post_like (게시글 좋아요)

  • id (게시글 좋아요ID) — bigint — Primary key — NOT NULL
  • account_id (회원ID) — bigint — Foreign key → user_account.id — NOT NULL
  • post_id (게시글ID) — bigint — Foreign key → post.id — NOT NULL
  • is_liked (좋아요 여부) — boolean — NOT NULL
  • updated_at (수정일) — timestamp — NOT NULL

user_account (사용자)

  • id (사용자ID) — bigint — Primary key — NOT NULL
  • email (이메일) — varchar(255) — NOT NULL
  • password (비밀번호) — varchar(255) — NOT NULL
  • nickname (닉네임) — varchar(10) — NOT NULL
  • profile_image_url (프로필 이미지 경로) — varchar(255)
  • is_deleted (탈퇴 여부) — boolean — NOT NULL
  • created_at (가입일) — timestamp — NOT NULL
  • updated_at (수정일) — timestamp — NOT NULL
  • deleted_at (삭제일) — timestamp