Add bookmark in persistence layer
This commit is contained in:
+13
-1
@@ -9,7 +9,7 @@ type PlayQueue struct {
|
||||
UserID string `json:"userId" orm:"column(user_id)"`
|
||||
Comment string `json:"comment"`
|
||||
Current string `json:"current"`
|
||||
Position float32 `json:"position"`
|
||||
Position int64 `json:"position"`
|
||||
ChangedBy string `json:"changedBy"`
|
||||
Items MediaFiles `json:"items,omitempty"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
@@ -21,4 +21,16 @@ type PlayQueues []PlayQueue
|
||||
type PlayQueueRepository interface {
|
||||
Store(queue *PlayQueue) error
|
||||
Retrieve(userId string) (*PlayQueue, error)
|
||||
AddBookmark(userId, id, comment string, position int64) error
|
||||
GetBookmarks(userId string) (Bookmarks, error)
|
||||
DeleteBookmark(userId, id string) error
|
||||
}
|
||||
|
||||
type Bookmark struct {
|
||||
ID string `json:"id" orm:"column(id)"`
|
||||
Comment string `json:"comment"`
|
||||
Position int64 `json:"position"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
}
|
||||
|
||||
type Bookmarks []Bookmark
|
||||
|
||||
Reference in New Issue
Block a user