合并 origin/main 设备注册后,纳入本地 music 模块、seed 命令与 popadmin 相关路由/文档;music migration 编号为 0020 以避免与 0019_devices 冲突。 Co-authored-by: Cursor <cursoragent@cursor.com>
38 lines
1.0 KiB
Go
38 lines
1.0 KiB
Go
package entity
|
|
|
|
import "time"
|
|
|
|
const (
|
|
SettingMemberPreviewSeconds = "member_preview_seconds"
|
|
DefaultPreviewSeconds = 30
|
|
|
|
MaxCoverBytes = 5 << 20 // 5 MiB
|
|
MaxAudioBytes = 50 << 20 // 50 MiB
|
|
)
|
|
|
|
// Track is one curated music item for the Spark music list.
|
|
type Track struct {
|
|
ID int64 `json:"id"`
|
|
Title string `json:"title"`
|
|
CoverKey string `json:"coverKey"`
|
|
AudioKey string `json:"audioKey"`
|
|
CoverURL string `json:"coverUrl"`
|
|
AudioURL string `json:"audioUrl"`
|
|
RequireMember bool `json:"requireMember"`
|
|
SortOrder int `json:"sortOrder"`
|
|
Enabled bool `json:"enabled"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
}
|
|
|
|
// Settings is the global music ops config.
|
|
type Settings struct {
|
|
MemberPreviewSeconds int `json:"memberPreviewSeconds"`
|
|
}
|
|
|
|
// Playlist is the client-facing payload.
|
|
type Playlist struct {
|
|
Items []Track `json:"items"`
|
|
MemberPreviewSeconds int `json:"memberPreviewSeconds"`
|
|
}
|