Files
navidrome/domain/album.go
T
Deluan db992a9941 Small changes regarding StarredAt.
Making StarredAt more "precise", setting it to the time the change was detected.
getStarred.view now returns albums ordered by StarredAt.
loadRange method now take QueryOptions.Desc into account
2016-03-22 19:00:18 -04:00

38 lines
806 B
Go

package domain
import "time"
type Album struct {
Id string
Name string
ArtistId string `parent:"artist"`
CoverArtPath string
CoverArtId string
Artist string
AlbumArtist string
Year int `idx:"Year"`
Compilation bool
Starred bool
PlayCount int
PlayDate time.Time
Duration int
Rating int
Genre string
StarredAt time.Time `idx:"Starred"`
CreatedAt time.Time
UpdatedAt time.Time
}
type Albums []Album
type AlbumRepository interface {
BaseRepository
Put(m *Album) error
Get(id string) (*Album, error)
FindByArtist(artistId string) (Albums, error)
GetAll(QueryOptions) (Albums, error)
PurgeInactive(active Albums) ([]string, error)
GetAllIds() ([]string, error)
GetStarred(QueryOptions) (Albums, error)
}