quintodrome/model/playlist.go

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

28 lines
753 B
Go
Raw Normal View History

2020-01-14 18:22:34 -09:00
package model
import "time"
type Playlist struct {
ID string `json:"id" orm:"column(id)"`
2020-05-08 06:47:06 -08:00
Name string `json:"name"`
Comment string `json:"comment"`
Duration float32 `json:"duration"`
SongCount int `json:"songCount"`
2020-05-08 06:47:06 -08:00
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