2020-01-21 23:01:43 -05:00
|
|
|
package model
|
|
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
2020-05-22 15:23:42 -04:00
|
|
|
type Annotations struct {
|
2021-08-01 01:21:20 -04:00
|
|
|
PlayCount int64 `structs:"-" json:"playCount"`
|
|
|
|
|
PlayDate time.Time `structs:"-" json:"playDate" `
|
|
|
|
|
Rating int `structs:"-" json:"rating" `
|
|
|
|
|
Starred bool `structs:"-" json:"starred" `
|
|
|
|
|
StarredAt time.Time `structs:"-" json:"starredAt"`
|
2020-05-22 15:23:42 -04:00
|
|
|
}
|
|
|
|
|
|
2020-01-31 21:09:23 -05:00
|
|
|
type AnnotatedRepository interface {
|
|
|
|
|
IncPlayCount(itemID string, ts time.Time) error
|
|
|
|
|
SetStar(starred bool, itemIDs ...string) error
|
|
|
|
|
SetRating(rating int, itemID string) error
|
2020-01-21 23:01:43 -05:00
|
|
|
}
|