qurious

Tables (11)

comment

  • comment_id (commentId) — SERIAL — Primary key — NOT NULL
  • post_id (id) — SERIAL — Foreign key → post.post_id — NOT NULL
  • user_id (userId) — SERIAL — Foreign key → user.user_id — NOT NULL
  • content — varchar
  • like_count (ike_count) — integer
  • creation_date — datetime
  • deletion_date — datetime
  • last_edit_date — datetime

comment_like

  • comment_id (commentId) — SERIAL — Foreign key → comment.comment_id — NOT NULL
  • user_id — SERIAL — Foreign key → user.user_id — NOT NULL

post

  • post_id — SERIAL — Primary key — NOT NULL
  • post_type_id — SERIAL — Foreign key → post_type.post_type_id — NOT NULL
  • user_id — SERIAL — Foreign key → user.user_id — NOT NULL
  • content — varchar
  • view_count — integer
  • like_count — integer
  • last_editor_user_id — SERIAL
  • creation_date — datetime
  • deletion_date — datetime
  • last_edit_date — datetime

post_attachment

  • post_attachment_id — SERIAL — Primary key — NOT NULL
  • post_id — SERIAL — Foreign key → post.post_id — NOT NULL
  • file_name — String
  • file_size — bigint
  • file_path — String

post_like

  • user_id — SERIAL — Foreign key → user.user_id — NOT NULL
  • post_id — SERIAL — Foreign key → post.post_id — NOT NULL

post_tag

  • tag_id — SERIAL — Foreign key → tag.tag_id — NOT NULL
  • post_id — SERIAL — Foreign key → post.post_id — NOT NULL

post_type

  • post_type_id — SERIAL — Primary key — NOT NULL
  • post_type_name — varchar

role

  • role_id — SERIAL — Primary key — NOT NULL
  • role_name — varchar — NOT NULL

tag

  • tag_id — SERIAL — Primary key — NOT NULL
  • tag_name — varchar

user

  • user_id — SERIAL — Primary key — NOT NULL
  • user_name — varchar
  • account_id — varchar
  • user_password — varchar
  • email — varchar
  • about_me — varchar
  • creation_date — datetime
  • last_access_date — datetime

user_role

  • user_id — SERIAL — Foreign key → user.user_id — NOT NULL
  • role_id — SERIAL — Foreign key → role.role_id — NOT NULL