add scene save and load in quasar backend
This commit is contained in:
3
backend/models/lightBar.go
Normal file
3
backend/models/lightBar.go
Normal file
@@ -0,0 +1,3 @@
|
||||
package models
|
||||
|
||||
type LightBar []Value
|
3
backend/models/movingHead.go
Normal file
3
backend/models/movingHead.go
Normal file
@@ -0,0 +1,3 @@
|
||||
package models
|
||||
|
||||
type MovingHead []Value
|
11
backend/models/scenes.go
Normal file
11
backend/models/scenes.go
Normal 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
9
backend/models/value.go
Normal 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
7
backend/models/values.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package models
|
||||
|
||||
type Values struct {
|
||||
MovingHead *MovingHead `json:"movingHead"`
|
||||
LightBar *LightBar `json:"lightBar"`
|
||||
Value any `json:"value"`
|
||||
}
|
Reference in New Issue
Block a user