Add a metadata system
This commit is contained in:
parent
07409a01be
commit
8b3218ad00
16 changed files with 365 additions and 61 deletions
13
internal/models/metadata.go
Normal file
13
internal/models/metadata.go
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
package models
|
||||
|
||||
// MetadataTable is the name of the table the 'Metadatum' model is stored in.
|
||||
const MetadataTable = "metadatum"
|
||||
|
||||
// Metadatum represents
|
||||
type Metadatum struct {
|
||||
Pk uint `gorm:"column:pk;primaryKey"`
|
||||
|
||||
Key string `gorm:"column:key;not null"` // key for the value, see the keys below
|
||||
Slug string `gorm:"column:slug"` // optional slug of instance
|
||||
Value []byte `gorm:"column:value"` // serialized json value of the data
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue