- verdicts table (per link, like ratings), PUT verdict endpoint, typed Verdict enum - share page: thumbs up/down, verdict filter with counts, view-scoped selection bar - lightbox: per-page shortcut table (P/X/U, 1-5/0, S), ? help overlay, action toast when a keyboard vote auto-advances - shared useLightbox hook; single keydown subscription reading live state via ref - album view: per-link thumbs and vote counts; share list shows accept/reject totals - feedback queries deduped and run concurrently; verdict counts in one scan
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
-- Client accept/reject votes, one per (link, photo) — a separate axis from
|
||||
-- the 1-5 star rating so a photo can be e.g. accepted but unrated.
|
||||
create table verdicts (
|
||||
share_id uuid not null references shares(id) on delete cascade,
|
||||
photo_id uuid not null references photos(id) on delete cascade,
|
||||
verdict text not null check (verdict in ('accept', 'reject')),
|
||||
updated_at timestamptz not null default now(),
|
||||
primary key (share_id, photo_id)
|
||||
);
|
||||
|
||||
-- Cascaded photo deletes fire per-row FK triggers; without this each one
|
||||
-- sequential-scans the table.
|
||||
create index verdicts_photo_idx on verdicts (photo_id);
|
||||
Reference in New Issue
Block a user