add scene save and load in quasar backend

This commit is contained in:
Adrian Zürcher
2025-06-19 19:33:13 +02:00
parent 3d865f47b3
commit e5b1dc2052
11 changed files with 354 additions and 64 deletions

View File

@@ -0,0 +1,3 @@
package models
type LightBar []Value

View File

@@ -0,0 +1,3 @@
package models
type MovingHead []Value

11
backend/models/scenes.go Normal file
View File

@@ -0,0 +1,11 @@
package models
type Scenes []Scene
type Scene struct {
Name string `json:"name"`
Desciption string `json:"description,omitempty"`
MovingHead bool `json:"movingHead"`
LightBar bool `json:"lightBar"`
Values []Value `json:"values,omitempty"`
}

9
backend/models/value.go Normal file
View File

@@ -0,0 +1,9 @@
package models
import "github.com/google/uuid"
type Value struct {
Uuid uuid.UUID `json:"uuid"`
Path string `json:"path"`
Value any `json:"value"`
}

7
backend/models/values.go Normal file
View File

@@ -0,0 +1,7 @@
package models
type Values struct {
MovingHead *MovingHead `json:"movingHead"`
LightBar *LightBar `json:"lightBar"`
Value any `json:"value"`
}