navidrome/domain/album.go

38 lines
806 B
Go
Raw Normal View History

2016-03-02 15:07:24 +01:00
package domain
import "time"
type Album struct {
2016-02-28 19:50:05 +01:00
Id string
Name string
2016-02-29 04:56:24 +01:00
ArtistId string `parent:"artist"`
CoverArtPath string
2016-03-03 16:34:17 +01:00
CoverArtId string
2016-03-03 06:25:26 +01:00
Artist string
AlbumArtist string
Year int `idx:"Year"`
2016-02-28 19:50:05 +01:00
Compilation bool
Starred bool
PlayCount int
PlayDate time.Time
2016-03-22 02:14:04 +01:00
Duration int
2016-02-28 19:50:05 +01:00
Rating int
Genre string
StarredAt time.Time `idx:"Starred"`
CreatedAt time.Time
UpdatedAt time.Time
}
2016-03-04 03:01:55 +01:00
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)
2016-03-02 19:18:39 +01:00
}