quintodrome/model/playlist.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
686 B
Go
Raw Normal View History

2020-01-14 18:22:34 -09:00
package model
import "time"
type Playlist struct {
2020-05-08 06:47:06 -08:00
ID string `json:"id"`
Name string `json:"name"`
Comment string `json:"comment"`
Duration float32 `json:"duration"`
Owner string `json:"owner"`
Public bool `json:"public"`
Tracks MediaFiles `json:"tracks"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
type PlaylistRepository interface {
2020-05-03 16:05:03 -08:00
CountAll(options ...QueryOptions) (int64, error)
Exists(id string) (bool, error)
Put(pls *Playlist) error
Get(id string) (*Playlist, error)
GetAll(options ...QueryOptions) (Playlists, error)
Delete(id string) error
}
type Playlists []Playlist