Rebuild SCUM plugin data ownership
This commit is contained in:
@@ -14,7 +14,7 @@ type GameGiftCatalog struct {
|
||||
UpdatedAt time.Time `json:"updatedAt" db:"updated_at"`
|
||||
}
|
||||
|
||||
func (GameGiftCatalog) TableName() string { return "scum_gift_catalogs" }
|
||||
func (GameGiftCatalog) TableName() string { return "game_gift_catalogs" }
|
||||
|
||||
// GameGiftRevision is an immutable gift item snapshot.
|
||||
type GameGiftRevision struct {
|
||||
@@ -27,7 +27,7 @@ type GameGiftRevision struct {
|
||||
PublishedAt time.Time `json:"publishedAt" db:"published_at"`
|
||||
}
|
||||
|
||||
func (GameGiftRevision) TableName() string { return "scum_gift_revisions" }
|
||||
func (GameGiftRevision) TableName() string { return "game_gift_revisions" }
|
||||
|
||||
// GameGiftGrant records a directed frozen gift lifecycle without raw game commands.
|
||||
type GameGiftGrant struct {
|
||||
@@ -42,4 +42,4 @@ type GameGiftGrant struct {
|
||||
UpdatedAt time.Time `json:"updatedAt" db:"updated_at"`
|
||||
}
|
||||
|
||||
func (GameGiftGrant) TableName() string { return "scum_gift_grants" }
|
||||
func (GameGiftGrant) TableName() string { return "game_gift_grants" }
|
||||
|
||||
@@ -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