2020-01-14 22:22:34 -05:00
|
|
|
package model
|
2016-03-09 10:09:15 -05:00
|
|
|
|
2020-04-11 16:45:21 -04:00
|
|
|
import "time"
|
|
|
|
|
|
2016-03-09 10:09:15 -05:00
|
|
|
type Playlist struct {
|
2020-04-11 16:45:21 -04:00
|
|
|
ID string
|
|
|
|
|
Name string
|
|
|
|
|
Comment string
|
|
|
|
|
Duration float32
|
|
|
|
|
Owner string
|
|
|
|
|
Public bool
|
|
|
|
|
Tracks MediaFiles
|
|
|
|
|
CreatedAt time.Time
|
|
|
|
|
UpdatedAt time.Time
|
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)
|
2020-01-21 16:35:57 -05:00
|
|
|
Put(pls *Playlist) error
|
2016-03-09 10:09:15 -05:00
|
|
|
Get(id string) (*Playlist, error)
|
2020-01-11 21:38:02 -05:00
|
|
|
GetAll(options ...QueryOptions) (Playlists, error)
|
2020-01-21 16:35:57 -05:00
|
|
|
Delete(id string) error
|
2016-03-09 10:09:15 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Playlists []Playlist
|