2016-03-02 05:07:24 -09:00
|
|
|
package domain
|
2016-02-25 21:32:31 -09:00
|
|
|
|
2016-03-04 05:09:16 -09:00
|
|
|
import "time"
|
|
|
|
|
|
2016-02-25 21:32:31 -09:00
|
|
|
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"`
|
2016-03-01 14:59:12 -09:00
|
|
|
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
|
2016-03-04 13:01:14 -09:00
|
|
|
PlayCount int
|
|
|
|
|
PlayDate time.Time
|
2016-02-28 09:50:05 -09:00
|
|
|
Rating int
|
2016-03-02 18:43:31 -09:00
|
|
|
Genre string
|
2016-03-04 05:09:16 -09:00
|
|
|
CreatedAt time.Time
|
|
|
|
|
UpdatedAt time.Time
|
2016-03-02 05:33:49 -09:00
|
|
|
}
|
|
|
|
|
|
2016-03-03 17:01:55 -09:00
|
|
|
type Albums []Album
|
|
|
|
|
|
2016-03-02 05:33:49 -09:00
|
|
|
type AlbumRepository interface {
|
|
|
|
|
BaseRepository
|
|
|
|
|
Put(m *Album) error
|
|
|
|
|
Get(id string) (*Album, error)
|
2016-03-08 16:33:09 -09:00
|
|
|
FindByArtist(artistId string) (*Albums, error)
|
|
|
|
|
GetAll(QueryOptions) (*Albums, error)
|
2016-03-08 10:18:17 -09:00
|
|
|
PurgeInactive(active *Albums) error
|
2016-03-08 17:54:32 -09:00
|
|
|
GetAllIds() (*[]string, error)
|
2016-03-02 09:18:39 -09:00
|
|
|
}
|