- API : nouvelle table book_reading_progress (migration 0016) et module reading_progress.rs avec GET/PATCH /books/:id/progress (token read) - API : GET /books/:id enrichi avec reading_status, reading_current_page, reading_last_read_at via LEFT JOIN - Backoffice : badge de statut (Non lu / En cours · p.N / Lu) sur la page de détail et overlay sur les BookCards - OpenSpec : change reading-progress avec proposal/design/specs/tasks Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
10 lines
414 B
SQL
10 lines
414 B
SQL
CREATE TABLE IF NOT EXISTS book_reading_progress (
|
|
book_id UUID PRIMARY KEY REFERENCES books(id) ON DELETE CASCADE,
|
|
status TEXT NOT NULL CHECK (status IN ('unread', 'reading', 'read')) DEFAULT 'unread',
|
|
current_page INT,
|
|
last_read_at TIMESTAMPTZ,
|
|
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
|
);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_book_reading_progress_status ON book_reading_progress(status);
|