待机功能基本实现

This commit is contained in:
2024-11-06 15:44:35 +08:00
parent 8e2bf7f59b
commit ab0678aa3b
14 changed files with 317 additions and 151 deletions

View File

@@ -1,29 +0,0 @@
package schema
type ItemType int
const (
TYPE_AUDIO ItemType = iota
TYPE_VIDEO
TYPE_WEB
TYPE_TTS
TYPE_RELAY
)
type TimeModel struct {
Start int64
End int64
}
type BackgroundItemModel struct {
TimeModel
Interval int64
Type ItemType
Data string
}
type BackgroundModel struct {
JsonModel
TimeModel
Items []BackgroundItemModel
}

29
internal/schema/wait.go Normal file
View File

@@ -0,0 +1,29 @@
package schema
type WaitType int
const (
WaitAudio WaitType = iota
WaitVideo
WaitWeb
WaitTTS
WaitRelay
)
type TimeModel struct {
Start int64
End int64
}
type WaitItemModel struct {
TimeModel
Type WaitType
Data string
Interval int64
}
type WaitModel struct {
JsonModel
TimeModel
Items []WaitItemModel
}