quintodrome/domain/album.go

35 lines
785 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 // TODO http://stackoverflow.com/questions/13795842/linking-itunes-itc2-files-and-ituneslibrary-xml
2016-03-03 06:34:17 -09:00
CoverArtId string
2016-03-02 20:25:26 -09:00
Artist string
AlbumArtist string
2016-02-28 09:50:05 -09:00
Year int
Compilation bool
2016-03-02 21:07:13 -09:00
Starred bool
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) error
GetAllIds() (*[]string, error)
2016-03-02 09:18:39 -09:00
}