Add the data layer with the build-db, fetch-lyrics, and fetch-artists subcommands

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-04 15:12:22 +08:00
co-authored by Claude Fable 5
parent f9ab79f0c2
commit 8d223177cd
17 changed files with 2320 additions and 9 deletions
+4 -4
View File
@@ -45,10 +45,10 @@
——此為「可再生仍 commit」的唯一例外,理由:引用穩定性
(十年尺度的環境會腐化)、審稿人零門檻、撰稿期數字變動
可 diff。
- **資料模型**`songs`(歌曲實體)、`chart_entries`
1 歌—N 筆榜單紀錄)、`artists`(歌手實體:Wikidata QID、
性別、型態、曲風、國籍)、`song_artists`M—N 關聯:角色、
署名順序)、`lyrics`1—1)。領域不變量(恰 1000 筆榜單、
- **資料模型**`songs`(歌曲實體,含 lyrics nullable 欄位)、
`chart_entries`1 歌—N 筆榜單紀錄)、`artists`(歌手實體:
Wikidata QID、性別、型態、曲風、國籍)、`song_artists`
M—N 關聯:角色、署名順序)。領域不變量(恰 1000 筆榜單、
每歌至少一 primary 歌手等)檢查內建於 `build-db`,違規即
建置失敗。
- **歌手背景防火牆**:歌手背景資料只進人工解讀階段(證據表、