rename model

This commit is contained in:
Adrian Zuercher
2025-05-04 20:55:12 +02:00
parent 285a2add53
commit c7154f0779

16
models/subscription.go Normal file
View File

@@ -0,0 +1,16 @@
package models
import "github.com/google/uuid"
// Subscription model
type Subscription struct {
Uuid uuid.UUID `json:"uuid,omitempty"` // universally unique identifier
Path string `json:"path,omitempty"` // dbm path
Depth uint `json:"depth,omitempty"` // depth of subscriptions from found path or uuid
Value any `json:"value,omitempty"` // current value
Drivers *Drivers `json:"drivers,omitempty"` // assigned drivers
Driver string `json:"driver,omitempty"` // driver type to assign this subscription
OnCreate bool `json:"onCreate,omitempty"` // notify at datapoint creation
OnDelete bool `json:"onDelete,omitempty"` // notify on deletion
OnChange bool `json:"onChange,omitempty"` // notify change
}