navidrome/model/scrobble.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
549 B
Go
Raw Permalink Normal View History

package model
import "time"
type Scrobble struct {
ID int64 `structs:"id" json:"id"`
MediaFileID string `structs:"media_file_id" json:"mediaFileId"`
UserID string `json:"-"`
SubmissionTime int64 `structs:"submission_time" json:"submissionTime"`
}
type ScrobbleRepository interface {
CountAll(options ...QueryOptions) (int64, error)
Get(id string) (*Scrobble, error)
GetAll(options ...QueryOptions) (Scrobbles, error)
RecordScrobble(mediaFileID string, submissionTime time.Time) error
}
type Scrobbles []Scrobble