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