forked from go/golangs_learn
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
379 B
18 lines
379 B
package models
|
|
|
|
import guuid "github.com/google/uuid"
|
|
|
|
type OfflinePlaylist struct {
|
|
UUID string `json:"uuid"`
|
|
Name string `json:"name"`
|
|
TracksIds []string `json:"tracksIds"`
|
|
}
|
|
|
|
func NewOfflinePlaylist(name string, tracks []string) OfflinePlaylist {
|
|
id := guuid.NewString()
|
|
return OfflinePlaylist{
|
|
UUID: id,
|
|
Name: name,
|
|
TracksIds: tracks,
|
|
}
|
|
}
|
|
|