A-4

Tables (4)

Comment Entity (comment)

  • PK (comment_id) — bigserial — Primary key — NOT NULL
  • Post PK (post_id) — bigint — Foreign key → Post Entity.PK — NOT NULL
  • User PK (user_id) — bigint — Foreign key → UserEntity.PK — NOT NULL
  • 댓글 내용 (content) — text
  • 댓글 작성일 (create_at) — timestamptz
  • 댓글 수정일 (update_at) — timestamptz
  • 댓글 작성자 (create_name) — text
  • 댓글 수정자 (update_name) — text

FollowEntity (follow)

  • PK (follow_id) — bigserial — Primary key — NOT NULL
  • UserPK (user_id) — bigint — Foreign key → UserEntity.PK — NOT NULL
  • FollowUserPK (follow_user_id) — bigint — Foreign key → UserEntity.PK — NOT NULL

Post Entity (post)

  • PK (post_id) — bigserial — Primary key — NOT NULL
  • User PK (user_id) — bigserial — Foreign key → UserEntity.PK — NOT NULL
  • 제목 (title) — text
  • 내용 (content) — text
  • 게시글 작성일 (create_at) — timestamptz
  • 게시글 수정일 (update_at) — timestamptz
  • 작성자 (create_name) — text
  • 수정자 (update_name) — text
  • 조회수 (views) — int

UserEntity (app_user)

  • PK (user_id) — bigserial — Primary key — NOT NULL
  • 유저 이름 (username) — text
  • 이메일 (email) — text
  • 비밀번호 (password) — text
  • 역할 (role) — text