2016-03-02 05:07:24 -09:00
|
|
|
package domain
|
2016-02-24 11:30:28 -09:00
|
|
|
|
2016-02-26 23:35:01 -09:00
|
|
|
import (
|
|
|
|
|
"time"
|
|
|
|
|
)
|
2016-02-24 11:30:28 -09:00
|
|
|
|
|
|
|
|
type MediaFile struct {
|
2016-02-26 23:35:01 -09:00
|
|
|
Id string
|
|
|
|
|
Path string
|
|
|
|
|
Title string
|
|
|
|
|
Album string
|
|
|
|
|
Artist string
|
|
|
|
|
AlbumArtist string
|
2016-03-02 09:18:39 -09:00
|
|
|
AlbumId string `parent:"album"`
|
2016-03-03 06:34:17 -09:00
|
|
|
HasCoverArt bool
|
2016-03-02 20:42:42 -09:00
|
|
|
TrackNumber int
|
|
|
|
|
DiscNumber int
|
2016-03-02 19:15:17 -09:00
|
|
|
Year int
|
2016-03-02 19:51:26 -09:00
|
|
|
Size string
|
|
|
|
|
Suffix string
|
|
|
|
|
Duration int
|
|
|
|
|
BitRate int
|
2016-03-02 18:43:31 -09:00
|
|
|
Genre string
|
2016-02-26 23:35:01 -09:00
|
|
|
Compilation bool
|
2016-03-02 21:07:13 -09:00
|
|
|
Starred bool
|
2016-02-26 23:35:01 -09:00
|
|
|
CreatedAt time.Time
|
|
|
|
|
UpdatedAt time.Time
|
2016-03-02 05:33:49 -09:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type MediaFileRepository interface {
|
|
|
|
|
BaseRepository
|
|
|
|
|
Put(m *MediaFile) error
|
2016-03-03 08:08:44 -09:00
|
|
|
Get(id string) (*MediaFile, error)
|
2016-03-02 19:15:17 -09:00
|
|
|
FindByAlbum(albumId string) ([]MediaFile, error)
|
2016-03-02 09:18:39 -09:00
|
|
|
}
|