package model // SrrdbRelease is one row of the srrdb_releases table described by // internal/db/srrdb.sql. Release is the primary key, therefore a repeated // search rewrites the previous row of the same release instead of inserting // a copy. Columns left nil are stored as NULL. type SrrdbRelease struct { Release string `db:"release"` Date string `db:"date"` HasNfo string `db:"has_nfo"` HasSrs string `db:"has_srs"` IsForeign string `db:"is_foreign"` ImdbID *string `db:"imdb_id"` Size int64 `db:"size"` GroupName string `db:"group_name"` Category string `db:"category"` Status *string `db:"status"` Nfo []byte `db:"nfo"` Content *string `db:"content"` CreatedAt string `db:"created_at"` SyncedAt *string `db:"synced_at"` } // SrrdbLog is one row of the srrdb_log table: per-day, per-category // accounting of a harvest run. Written in the same transaction as the // releases, so a day marked there always matches what landed in srrdb_releases. type SrrdbLog struct { Day string `db:"day"` Category string `db:"category"` Found int `db:"found"` Stored int `db:"stored"` Ignored int `db:"ignored"` RunAt string `db:"run_at"` }