TonE Project

Tables (13)

Comment (댓글)

  • id (댓글 아이디) — INT — Primary key — NOT NULL
  • content (댓글 내용) — TEXT
  • created_at (댓글 작성일) — DATE
  • user_id (댓글 작성자 아이디) — INT — Foreign key → User.id — NOT NULL
  • playlist_id (댓글 달린 플레이리스트 아이디) — INT — Foreign key → PlayList.id — NOT NULL

Favorite (즐겨찾기)

  • id (즐겨찾기 아이디) — INT — Primary key — NOT NULL
  • created_at (즐겨찾기 추가 날짜) — DATETIME
  • playlist_id (플레이리스트 아이디) — INT — Foreign key → PlayList.id — NOT NULL
  • user_id (사용자 아이디) — INT — Foreign key → User.id — NOT NULL
  • track_id (음악 아이디) — INT — Foreign key → Track.id — NOT NULL

Follow (팔로우)

  • id (팔로우 아이디) — INT — Primary key — NOT NULL
  • created_at (팔로우 추가 날짜) — DATE
  • following_id (팔로우 대상 사용자 아이디) — INT — Foreign key → User.id — NOT NULL
  • follower_id (팔로우한 사용자 아이디) — INT — Foreign key → User.id — NOT NULL

History (재생기록)

  • id (재생기록 아이디) — INT — Primary key — NOT NULL
  • played_at (재생 시각) — DATETIME
  • user_id (사용자 아이디) — INT — Foreign key → User.id — NOT NULL
  • track_id (음악 아이디) — INT — Foreign key → Track.id — NOT NULL

Like (좋아요)

  • id (좋아요 아이디) — INT — Primary key — NOT NULL
  • created_at (좋아요 누른 날짜) — DATE
  • user_id (좋아요 누른 사용자 아이디) — INT — Foreign key → User.id — NOT NULL
  • playlist_id (좋아요 대상 플레이리스트 아이디) — INT — Foreign key → PlayList.id — NOT NULL

Lyrics (가사)

  • id (가사 아이디) — INT — Primary key — NOT NULL
  • lyrics (가사 내용) — TEXT
  • language (가사 언어) — VARCHAR
  • created_at (가사 생성 날짜) — DATETIME
  • track_id (음악 아이디) — INT — Foreign key → Track.id — NOT NULL

PlayList (플레이리스트)

  • id (아이디) — INT — Primary key — NOT NULL
  • name (플레이리스트 이름) — VARCHAR
  • description (플레이리스트 설명) — VARCHAR
  • cover_image (커버 이미지 URL) — VARCHAR
  • is_public (공개 여부) — BOOLEAN
  • created_at (플레이리스트 생성일) — DATE
  • user_id (생성한 사용자 아이디) — INT — Foreign key → User.id — NOT NULL

PlayList_Track (재생 중인 음악)

  • id (고유 아이디) — INT — Primary key — NOT NULL
  • position (플레이 리스트 내 순서) — INT
  • playlist_id (연결된 플레이리스트 아이디) — INT — Foreign key → PlayList.id — NOT NULL
  • track_id (연결된 음악 아이디) — INT — Foreign key → Track.id — NOT NULL

Report (신고)

  • id (신고 아이디) — INT — Primary key — NOT NULL
  • target_type (신고 대상 유형) — ENUM(comment, playlist)
  • target_id (신고 대상 아이디) — INT
  • reason (신고 사유) — TEXT
  • status (처리 상태) — VARCHAR
  • created_at (신고 날짜) — DATETIME
  • user_id (신고한 사용자 아이디) — INT — Foreign key → User.id — NOT NULL

Subscription (구독)

  • id (구독 아이디) — INT — Primary key — NOT NULL
  • created_at (구독날짜) — DATE
  • user_id (구독자 아이디) — INT — Foreign key → User.id — NOT NULL
  • playlist_id (구독한 플레이리스트 아이디) — INT — Foreign key → PlayList.id — NOT NULL

Track (음악)

  • id (음악 아이디) — INT — Primary key — NOT NULL
  • title (음악 제목) — VARCHAR
  • artist (아티스트 이름) — VARCHAR
  • album (앨범 이름) — VARCHAR
  • duration (재생시간(초단위)) — TIME
  • genre (장르) — VARCHAR
  • cover_image (앨범 커버 이미지) — VARCHAR
  • track_url (음악 URL) — VARCHAR

Track_Statistics (재생 통계)

  • id (통계 아이디) — INT — Primary key — NOT NULL
  • play_count (재생 횟수) — INT
  • like_count (좋아요 갯수) — INT
  • comment_count (댓글 개수) — INT
  • updated_at (업데이트 날짜) — DATETIME
  • track_id (음악 아이디) — INT — Foreign key → Track.id — NOT NULL

User (유저)

  • id (아이디) — INT — Primary key — NOT NULL
  • username (사용자 이름) — VARCHAR
  • email (이메일) — VARCHAR
  • password (비밀번호) — VARCHAR
  • profile_picture (프로필 사진) — VARCHAR
  • created_at (가입일) — DATE
  • is_deleted (탈퇴여부) — BOOLEAN