2025-12-06 11:07:18 -05:00
|
|
|
package model
|
|
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
|
|
type Scrobble struct {
|
2026-07-13 15:32:03 +00:00
|
|
|
ID int64 `structs:"id" json:"id"`
|
|
|
|
|
MediaFileID string `structs:"media_file_id" json:"mediaFileId"`
|
|
|
|
|
UserID string `json:"-"`
|
|
|
|
|
SubmissionTime int64 `structs:"submission_time" json:"submissionTime"`
|
2025-12-06 11:07:18 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type ScrobbleRepository interface {
|
2026-07-13 15:32:03 +00:00
|
|
|
CountAll(options ...QueryOptions) (int64, error)
|
|
|
|
|
Get(id string) (*Scrobble, error)
|
|
|
|
|
GetAll(options ...QueryOptions) (Scrobbles, error)
|
2025-12-06 11:07:18 -05:00
|
|
|
RecordScrobble(mediaFileID string, submissionTime time.Time) error
|
|
|
|
|
}
|
2026-07-13 15:32:03 +00:00
|
|
|
|
|
|
|
|
type Scrobbles []Scrobble
|