test
Tables (18)
album_Artist (앨범 ↔ 아티스트 참여 (합작))
- id (아이디) — BIGINT — Primary key — NOT NULL
- artist_id (아티스트아이디) — BIGINT — Foreign key → artists.artist_id — NOT NULL
- album_id (앨범아이디) — BIGINT — Foreign key → albums.album_id — NOT NULL
- roles (합작타입) — VARCHAR(100)
albums (앨범)
- album_id (아이디) — BIGINT — Primary key — NOT NULL
- title (제목) — VARCHAR(255) — NOT NULL
- release_date (발매날짜) — DATE — NOT NULL
- cover_img_url (커버이미지) — TEXT
- album_type (앨범종류) — VARCHAR(50)
artists (아티스트)
- artist_id (아이디) — BIGINT — Primary key — NOT NULL
- name (아티스트이름) — VARCHAR(100) — NOT NULL
- agency (기획사) — VARCHAR(100)
- debut_date (데뷔날짜) — DATE
- image_url (이미지url) — TEXT
chart_Song (차트별 곡 순위 정보)
- id (아이디) — BIGINT — Primary key — NOT NULL
- song_id (노래아이디) — BIGINT — Foreign key → songs.song_id — NOT NULL
- chart_id (차트아이디) — BIGINT — Foreign key → charts.chart_id — NOT NULL
- rank (순위) — INT
- rank_change (전주대비순위변동) — INT
charts (차트)
- chart_id (차트아이디) — BIGINT — Primary key — NOT NULL
- title (차트제목) — VARCHAR(255)
- chart_type (차트타입) — VARCHAR(100)
- base_time (집계일시) — DATETIME
genres (장르)
- genre_id (아이디) — BIGINT — Primary key — NOT NULL
- name (장르이름) — VARCHAR(100) — NOT NULL
payments (결제)
- pay_id (아이디) — BIGINT — Primary key — NOT NULL
- user_id (회원아이디) — BIGINT — Foreign key → users.user_id — NOT NULL
- us_id (회원별구독아이디) — BIGINT — Foreign key → user_Subscription.us_id — NOT NULL
- amount (결제금액) — INT — NOT NULL
- pay_method (결제방식) — VARCHAR(50)
- paid_at (결제날짜) — DATETIME — NOT NULL
- is_success (결제성공여부) — BOOLEAN — NOT NULL
play_Log (재생기록)
- log_id (아이디) — BIGINT — Primary key — NOT NULL
- user_id (유저아이디) — BIGINT — Foreign key → users.user_id — NOT NULL
- song_id (노래아이디) — BIGINT — Foreign key → songs.song_id — NOT NULL
- started_at (재생시작시간) — DATETIME — NOT NULL
- ended_at (재생종료시간) — DATETIME — NOT NULL
playlist_Song (플레이리스트 ↔ 곡 수록)
- id (아이디) — BIGINT — Primary key — NOT NULL
- song_id (노래아이디) — BIGINT — Foreign key → songs.song_id — NOT NULL
- playlist_id (플리아이디) — BIGINT — Foreign key → playlists.playlist_id — NOT NULL
- display_order (플레이순서) — INT — NOT NULL
- added_at (추가날짜) — DATETIME — NOT NULL
playlists (플레이리스트)
- playlist_id (아이디) — BIGINT — Primary key — NOT NULL
- user_id (유저아이디) — BIGINT — Foreign key → users.user_id — NOT NULL
- title (플리제목) — VARCHAR(100) — NOT NULL
- is_public (공개여부) — BOOLEAN — NOT NULL
- play_created_at (생성날짜) — DATETIME — NOT NULL
song_Artist (곡<->아티스트)
- id (아이디) — BIGINT — Primary key — NOT NULL
- song_id (노래아이디) — BIGINT — Foreign key → songs.song_id — NOT NULL
- artist_id (아티스트아이디) — BIGINT — Foreign key → artists.artist_id — NOT NULL
- artist_type (아티스트타입) — VARCHAR(100) — NOT NULL
song_Genre (노래 ↔ 장르)
- id (아이디) — BIGINT — Primary key — NOT NULL
- song_id (노래아이디) — BIGINT — Foreign key → songs.song_id — NOT NULL
- genre_id (장르아이디) — BIGINT — Foreign key → genres.genre_id — NOT NULL
songs (노래)
- song_id (아이디) — BIGINT — Primary key — NOT NULL
- album_id (앨범아이디) — BIGINT — Foreign key → albums.album_id — NOT NULL
- title (제목) — VARCHAR(255) — NOT NULL
- track_number (앨범트랙번호) — INT
- duration (재생시간) — INT — NOT NULL
- lyrics (가사) — TEXT
- file_url (음원파일경로) — TEXT — NOT NULL
- is_title (타이틀곡여부) — BOOLEAN — NOT NULL
subscriptions (구독)
- sub_id (아이디) — BIGINT — Primary key — NOT NULL
- name (이름) — VARCHAR(255) — NOT NULL
- price (가격) — INT — NOT NULL
- period_days (유효기간) — INT — NOT NULL
userSongStat (회원별 곡 누적 통계)
- song_id (노래아이디) — BIGINT — Foreign key → songs.song_id — NOT NULL
- user_id (유저아이디) — BIGINT — Foreign key → users.user_id — NOT NULL
- play_count (누적재생횟수) — INT — NOT NULL
- last_played_at (토탈 재생 시간) — BIGINT
- is_like (좋아요여부) — BOOLEAN — NOT NULL
user_Artist (회원 ↔ 아티스트 팔로우)
- id (아이디) — BIGINT — Primary key — NOT NULL
- user_id (유저아이디) — BIGINT — Foreign key → users.user_id — NOT NULL
- artist_id (아티스트아이디) — BIGINT — Foreign key → artists.artist_id — NOT NULL
- follow_created_at (팔로우시점) — DATETIME
user_Subscription (회원별 구독)
- us_id (아이디) — BIGINT — Primary key — NOT NULL
- user_id (유저아이디) — BIGINT — Foreign key → users.user_id — NOT NULL
- sub_id (구독아이디) — BIGINT — Foreign key → subscriptions.sub_id — NOT NULL
- start_date (구독날짜) — DATETIME — NOT NULL
- end_date (만료일) — DATETIME — NOT NULL
- status (활성화) — VARCHAR(20) — NOT NULL
- auto_renew (갱신여부) — BOOLEAN — NOT NULL
users (회원)
- user_id (아이디) — BIGINT — Primary key — NOT NULL
- email (이메일) — VARCHAR(255) — NOT NULL
- password (비밀번호) — VARCHAR(255) — NOT NULL
- nickname (별명) — VARCHAR(100) — NOT NULL
- membership (맴버쉽) — ENUM('Free', 'Premium') — NOT NULL
- created_at (생성날짜) — DATETIME — NOT NULL
- is_admin (권한) — BOOLEAN — NOT NULL