2020-01-14 22:22:34 -05:00
|
|
|
package model
|
2016-03-09 10:09:15 -05:00
|
|
|
|
|
|
|
|
type Playlist struct {
|
2020-01-09 23:33:01 -05:00
|
|
|
ID string
|
2016-03-09 19:48:43 -05:00
|
|
|
Name string
|
2016-03-24 13:28:20 -04:00
|
|
|
Comment string
|
2016-03-09 19:48:43 -05:00
|
|
|
FullPath string
|
2016-03-21 12:26:55 -04:00
|
|
|
Duration int
|
|
|
|
|
Owner string
|
|
|
|
|
Public bool
|
2016-03-09 19:48:43 -05:00
|
|
|
Tracks []string
|
2016-03-09 10:09:15 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type PlaylistRepository interface {
|
2020-01-15 08:21:32 -05:00
|
|
|
CountAll() (int64, error)
|
|
|
|
|
Exists(id string) (bool, error)
|
2016-03-09 10:09:15 -05:00
|
|
|
Put(m *Playlist) error
|
|
|
|
|
Get(id string) (*Playlist, error)
|
2020-01-11 21:38:02 -05:00
|
|
|
GetAll(options ...QueryOptions) (Playlists, error)
|
2016-03-09 10:09:15 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Playlists []Playlist
|