refactor: remove annotation handling from engine

This commit is contained in:
Deluan 2020-01-30 22:07:02 -05:00 committed by Deluan Quintão
parent 67ed830a68
commit 72d9ddf532
20 changed files with 151 additions and 386 deletions

View file

@ -5,7 +5,7 @@ import "time"
type Album struct {
ID string `json:"id" orm:"column(id)"`
Name string `json:"name"`
ArtistID string `json:"artistId"`
ArtistID string `json:"artistId" orm:"pk;column(artist_id)"`
CoverArtPath string `json:"-"`
CoverArtId string `json:"-"`
Artist string `json:"artist"`
@ -37,7 +37,7 @@ type AlbumRepository interface {
GetAll(...QueryOptions) (Albums, error)
GetMap(ids []string) (map[string]Album, error)
GetRandom(...QueryOptions) (Albums, error)
GetStarred(userId string, options ...QueryOptions) (Albums, error)
GetStarred(options ...QueryOptions) (Albums, error)
Search(q string, offset int, size int) (Albums, error)
Refresh(ids ...string) error
PurgeEmpty() error