feat: add CRUD operations for notifications_sent table

Implement MarkNotificationSent, IsNotificationSent, and
GetUnnotifiedReleases with LEFT JOIN query. Includes 10
table-driven tests covering success, error, idempotent,
and edge cases. Also go fmt cleanup on existing files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-20 09:27:08 +03:00
parent 3b87bfce96
commit 68660e4d83
5 changed files with 354 additions and 20 deletions

View File

@@ -225,7 +225,7 @@ func TestUpdateArtistSettings_Success(t *testing.T) {
// Update only name and monitored.
updates := map[string]interface{}{
"name": "Updated",
"name": "Updated",
"monitored": false,
}
if err := UpdateArtistSettings(db, "artist-1", updates); err != nil {