quintodrome/domain/album.go

36 lines
764 B
Go
Raw Normal View History

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