quintodrome/model/playqueue.go

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

38 lines
1,016 B
Go
Raw Normal View History

2020-07-31 07:42:51 -08:00
package model
import (
"time"
)
type PlayQueue struct {
ID string `json:"id" orm:"column(id)"`
UserID string `json:"userId" orm:"column(user_id)"`
Comment string `json:"comment"`
Current string `json:"current"`
2020-07-31 11:32:08 -08:00
Position int64 `json:"position"`
2020-07-31 07:42:51 -08:00
ChangedBy string `json:"changedBy"`
Items MediaFiles `json:"items,omitempty"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
type PlayQueues []PlayQueue
type PlayQueueRepository interface {
Store(queue *PlayQueue) error
Retrieve(userId string) (*PlayQueue, error)
2020-07-31 11:32:08 -08:00
AddBookmark(userId, id, comment string, position int64) error
GetBookmarks(userId string) (Bookmarks, error)
DeleteBookmark(userId, id string) error
2020-07-31 07:42:51 -08:00
}
2020-07-31 11:32:08 -08:00
type Bookmark struct {
2020-07-31 12:03:27 -08:00
Item MediaFile `json:"item"`
2020-07-31 11:32:08 -08:00
Comment string `json:"comment"`
Position int64 `json:"position"`
CreatedAt time.Time `json:"createdAt"`
2020-07-31 11:52:41 -08:00
UpdatedAt time.Time `json:"updatedAt"`
2020-07-31 11:32:08 -08:00
}
type Bookmarks []Bookmark