+general tables

This commit is contained in:
Simon Martens
2026-01-12 15:16:11 +01:00
parent 925f22607b
commit 696f7fe087
9 changed files with 486 additions and 0 deletions

27
dbmodels/data.go Normal file
View File

@@ -0,0 +1,27 @@
package dbmodels
import "github.com/pocketbase/pocketbase/core"
type Data struct {
core.BaseRecordProxy
}
func (d *Data) Key() string {
return d.GetString(KEY_FIELD)
}
func (d *Data) SetKey(key string) {
d.Set(KEY_FIELD, key)
}
func (d *Data) Value() map[string]interface{} {
val := d.Get(VALUE_FIELD)
if val == nil {
return nil
}
return val.(map[string]interface{})
}
func (d *Data) SetValue(value map[string]interface{}) {
d.Set(VALUE_FIELD, value)
}