Rebuild SCUM plugin data ownership
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
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" }
|
||||
Reference in New Issue
Block a user