my-music-moment

Tables (16)

artist

  • id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(50) — NOT NULL

comment_histories

  • id — BIGINT — Primary key — NOT NULL
  • content — VARCHAR(1000) — NOT NULL
  • changed_at — TIMESTAMP — NOT NULL
  • comment_id — BIGINT — Foreign key → comments.id — NOT NULL

comments

  • id — BIGINT — Primary key — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP
  • post_id — BIGINT — Foreign key → posts.id — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • parent_comment_id — BIGINT — Foreign key → comments.id
  • content — VARCHAR(1000) — NOT NULL
  • deleted_at — TIMESTAMP

music

  • id — BIGINT — Primary key — NOT NULL
  • title — VARCHAR(255) — NOT NULL
  • cover — VARCHAR(255) — NOT NULL

music_artist

  • artist_id — BIGINT — Foreign key → artist.id — NOT NULL
  • music_id — BIGINT — Foreign key → music.id — NOT NULL

post_contents

  • id — BIGINT — Foreign key → posts.id — NOT NULL
  • content — TEXT — NOT NULL

post_histories

  • id — BIGINT — Primary key — NOT NULL
  • title — VARCHAR(255) — NOT NULL
  • content — TEXT — NOT NULL
  • image — VARCHAR(500)
  • post_id — BIGINT — Foreign key → posts.id — NOT NULL
  • changed_at — TIMESTAMP — NOT NULL

post_likes

  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • post_id — BIGINT — Foreign key → posts.id — NOT NULL

post_reports

  • post_id — BIGINT — Foreign key → posts.id — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • reported_at — TIMESTAMP — NOT NULL
  • reason — VARCHAR(255) — NOT NULL
  • status — VARCHAR(50) — NOT NULL

post_views

  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • post_id — BIGINT — Foreign key → posts.id — NOT NULL
  • last_viewed_at — TIMESTAMP

posts

  • id — BIGINT — Primary key — NOT NULL
  • title — VARCHAR(255) — NOT NULL
  • image — VARCHAR(500)
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP
  • like_count — BIGINT — NOT NULL
  • view_count — BIGINT — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • report_count — INT — NOT NULL
  • temp_id — BIGINT — Foreign key → temp_posts.id — NOT NULL
  • blinded_at — TIMESTAMP
  • deleted_at — TIMESTAMP
  • comment_count — BIGINT — NOT NULL
  • artist_id — BIGINT — Foreign key → music_artist.artist_id — NOT NULL
  • music_id — BIGINT — Foreign key → music_artist.music_id — NOT NULL

refresh_tokens

  • id — BIGINT — Primary key — NOT NULL
  • expires_at — TIMESTAMP — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • token — VARCHAR(500) — NOT NULL

temp_posts

  • id — BIGINT — Primary key — NOT NULL
  • title — VARCHAR(255) — NOT NULL
  • content — TEXT — NOT NULL
  • image — VARCHAR(500)
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • post_id — BIGINT

user_histories

  • id — BIGINT — Primary key — NOT NULL
  • image — VARCHAR(500)
  • nickname — VARCHAR(50) — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • changed_at — TIMESTAMP — NOT NULL

user_post_stats

  • id — BIGINT — Foreign key → users.id — NOT NULL
  • created_at — TIMESTAMP
  • count — BIGINT — NOT NULL

users

  • id — BIGINT — Primary key — NOT NULL
  • email — VARCHAR(255) — NOT NULL
  • password — VARCHAR(255)
  • nickname — VARCHAR(50) — NOT NULL
  • image — VARCHAR(500)
  • deleted_at — TIMESTAMP
  • role — VARCHAR(20) — NOT NULL