mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2026-02-04 02:25:30 +00:00
28 lines
469 B
Go
28 lines
469 B
Go
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)
|
|
}
|