package model import ( "context" "time" ) type Annotations struct { PlayCount int64 `structs:"play_count" json:"playCount,omitempty"` PlayDate *time.Time `structs:"play_date" json:"playDate,omitempty" ` Rating int `structs:"rating" json:"rating,omitempty" ` RatedAt *time.Time `structs:"rated_at" json:"ratedAt,omitempty" ` Starred bool `structs:"starred" json:"starred,omitempty" ` StarredAt *time.Time `structs:"starred_at" json:"starredAt,omitempty"` AverageRating float64 `structs:"average_rating" json:"averageRating,omitempty"` } type AnnotatedRepository interface { IncPlayCount(ctx context.Context, itemID string, ts time.Time) error SetStar(ctx context.Context, starred bool, itemIDs ...string) error SetRating(ctx context.Context, rating int, itemID string) error ReassignAnnotation(ctx context.Context, prevID string, newID string) error }