quintodrome/model/album.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.8 KiB
Go
Raw Normal View History

2020-01-14 18:22:34 -09:00
package model
import "time"
type Album struct {
Annotations
2020-04-24 06:13:59 -08:00
ID string `json:"id" orm:"column(id)"`
Name string `json:"name"`
CoverArtPath string `json:"coverArtPath"`
CoverArtId string `json:"coverArtId"`
ArtistID string `json:"artistId" orm:"pk;column(artist_id)"`
Artist string `json:"artist"`
AlbumArtistID string `json:"albumArtistId" orm:"pk;column(album_artist_id)"`
AlbumArtist string `json:"albumArtist"`
MaxYear int `json:"maxYear"`
MinYear int `json:"minYear"`
Compilation bool `json:"compilation"`
SongCount int `json:"songCount"`
Duration float32 `json:"duration"`
Genre string `json:"genre"`
FullText string `json:"fullText"`
SortAlbumName string `json:"sortAlbumName"`
SortArtistName string `json:"sortArtistName"`
SortAlbumArtistName string `json:"sortAlbumArtistName"`
OrderAlbumName string `json:"orderAlbumName"`
OrderAlbumArtistName string `json:"orderAlbumArtistName"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
2016-03-03 17:01:55 -09:00
type Albums []Album
type AlbumRepository interface {
CountAll(...QueryOptions) (int64, error)
Exists(id string) (bool, error)
Get(id string) (*Album, error)
2020-03-25 14:51:13 -08:00
FindByArtist(albumArtistId string) (Albums, error)
GetAll(...QueryOptions) (Albums, error)
GetRandom(...QueryOptions) (Albums, error)
GetStarred(options ...QueryOptions) (Albums, error)
2020-01-13 11:41:14 -09:00
Search(q string, offset int, size int) (Albums, error)
2020-01-16 12:53:48 -09:00
Refresh(ids ...string) error
2020-01-31 17:09:23 -09:00
AnnotatedRepository
2016-03-02 09:18:39 -09:00
}
func (a Album) GetAnnotations() Annotations {
return a.Annotations
}