2020-01-15 04:22:34 +01:00
|
|
|
package model
|
2016-02-26 07:32:31 +01:00
|
|
|
|
|
|
|
type Artist struct {
|
2020-05-22 21:23:42 +02:00
|
|
|
Annotations
|
|
|
|
|
2020-04-24 16:13:59 +02:00
|
|
|
ID string `json:"id" orm:"column(id)"`
|
|
|
|
Name string `json:"name"`
|
2020-05-08 15:50:33 +02:00
|
|
|
AlbumCount int `json:"albumCount"`
|
|
|
|
SongCount int `json:"songCount"`
|
2020-04-24 16:13:59 +02:00
|
|
|
FullText string `json:"fullText"`
|
|
|
|
SortArtistName string `json:"sortArtistName"`
|
|
|
|
OrderArtistName string `json:"orderArtistName"`
|
2016-03-02 15:33:49 +01:00
|
|
|
}
|
2020-01-28 14:22:17 +01:00
|
|
|
|
2020-01-18 02:46:19 +01:00
|
|
|
type Artists []Artist
|
|
|
|
|
|
|
|
type ArtistIndex struct {
|
|
|
|
ID string
|
|
|
|
Artists Artists
|
|
|
|
}
|
|
|
|
type ArtistIndexes []ArtistIndex
|
2016-03-02 15:33:49 +01:00
|
|
|
|
|
|
|
type ArtistRepository interface {
|
2020-01-28 14:22:17 +01:00
|
|
|
CountAll(options ...QueryOptions) (int64, error)
|
2020-01-15 14:21:32 +01:00
|
|
|
Exists(id string) (bool, error)
|
2016-03-02 15:33:49 +01:00
|
|
|
Put(m *Artist) error
|
|
|
|
Get(id string) (*Artist, error)
|
2020-01-31 04:07:02 +01:00
|
|
|
GetStarred(options ...QueryOptions) (Artists, error)
|
2020-01-13 22:02:49 +01:00
|
|
|
Search(q string, offset int, size int) (Artists, error)
|
2020-01-16 22:53:48 +01:00
|
|
|
Refresh(ids ...string) error
|
2020-01-18 02:46:19 +01:00
|
|
|
GetIndex() (ArtistIndexes, error)
|
2020-02-01 03:09:23 +01:00
|
|
|
AnnotatedRepository
|
2016-03-02 15:33:49 +01:00
|
|
|
}
|
2020-05-22 21:23:42 +02:00
|
|
|
|
|
|
|
func (a Artist) GetAnnotations() Annotations {
|
|
|
|
return a.Annotations
|
|
|
|
}
|