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