travel-board

Tables (6)

account

  • id — bigint — Primary key — NOT NULL
  • email — varchar(255)
  • password — varchar(255)
  • created_by — bigint
  • created_at — datetime(6)
  • updated_by — bigint
  • updated_at — datetime(6)

admin

  • id — bigint — Primary key — NOT NULL
  • id (account_id) — bigint — Foreign key → account.id — NOT NULL
  • created_by — bigint
  • created_at — datetime(6)
  • updated_by — bigint
  • updated_at — datetime(6)

comment

  • id — bigint — Primary key — NOT NULL
  • id (user_id) — bigint — Foreign key → users.id — NOT NULL
  • id (post_id) — bigint — Foreign key → post.id — NOT NULL
  • id (parent_comment_id) — bigint — Foreign key → comment.id — NOT NULL
  • content — text
  • created_by — bigint
  • created_at — datetime(6)
  • updated_by — bigint
  • updated_at — datetime(6)

membership (product)

  • id — bigint — Primary key — NOT NULL
  • id (user_id) — bigint — Foreign key → users.id — NOT NULL
  • level — varchar(30)
  • Field (start_at) — datetime(6)
  • membership_end_at (end_at) — datetime(6)
  • created_by — bigint
  • created_at — datetime(6)
  • updated_by — bigint
  • updated_at — datetime(6)

post

  • id — bigint — Primary key — NOT NULL
  • id (user_id) — bigint — Foreign key → users.id — NOT NULL
  • location — varchar(50)
  • title — varchar(255)
  • content — mediumtext
  • need_premium — bit — NOT NULL
  • views — integer — NOT NULL
  • created_by — bigint
  • created_at — datetime(6)
  • updated_by — bigint
  • updated_at — datetime(6)

users

  • id — bigint — Primary key — NOT NULL
  • id (account_id) — bigint — Foreign key → account.id — NOT NULL
  • nickname — varchar(50)
  • profile_image_url — varchar(512)
  • bio — varchar(300)
  • Field (refresh_token) — varchar(600)
  • created_by — bigint
  • created_at — datetime(6)
  • updated_by — bigint
  • updated_at — datetime(6)