21 lines
812 B
Go
21 lines
812 B
Go
package model
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// PluginDataRecord is the generic storage model for plugin-owned collections.
|
|
// Collection payload schemas remain in the plugin package.
|
|
type PluginDataRecord struct {
|
|
ID string `json:"id" db:"id"`
|
|
PluginID string `json:"pluginId" db:"plugin_id"`
|
|
ServerInstanceID string `json:"serverInstanceId" db:"server_instance_id"`
|
|
Collection string `json:"collection" db:"collection"`
|
|
Key string `json:"key" db:"record_key"`
|
|
Value map[string]any `json:"value" db:"value"`
|
|
CreatedAt time.Time `json:"createdAt" db:"created_at"`
|
|
UpdatedAt time.Time `json:"updatedAt" db:"updated_at"`
|
|
}
|
|
|
|
func (PluginDataRecord) TableName() string { return "plugin_data_records" }
|