42 lines
5.3 KiB
Go
42 lines
5.3 KiB
Go
package model
|
||
|
||
import "time"
|
||
|
||
// HotgameProviderConfig 保存每个系统、每个环境的热游回调验签配置。
|
||
type HotgameProviderConfig struct {
|
||
ID int64 `gorm:"column:id;primaryKey"` // 主键
|
||
SysOrigin string `gorm:"column:sys_origin;size:32;uniqueIndex:uk_hotgame_provider_sys_origin_profile,priority:1;index:idx_hotgame_provider_active,priority:1"` // 系统标识
|
||
Profile string `gorm:"column:profile;size:32;default:PROD;uniqueIndex:uk_hotgame_provider_sys_origin_profile,priority:2"` // 配置环境:PROD/TEST
|
||
Active bool `gorm:"column:active;index:idx_hotgame_provider_active,priority:2"` // app 当前启用环境
|
||
AppKey string `gorm:"column:app_key;size:255"` // 热游回调 MD5 key
|
||
CallbackBaseURL string `gorm:"column:callback_base_url;size:1024"` // 提供给热游配置的回调域名
|
||
TestUID string `gorm:"column:test_uid;size:64"` // 联调用 UID 覆盖
|
||
TestToken string `gorm:"column:test_token;size:1024"` // 联调用 token 覆盖
|
||
CreateTime time.Time `gorm:"column:create_time"` // 创建时间
|
||
UpdateTime time.Time `gorm:"column:update_time;index:idx_hotgame_provider_active,priority:3"` // 更新时间
|
||
}
|
||
|
||
// TableName 返回热游接入配置表名。
|
||
func (HotgameProviderConfig) TableName() string { return "hotgame_provider_config" }
|
||
|
||
// HotgameGameCatalog 保存从热游对接表导入的游戏目录。
|
||
type HotgameGameCatalog struct {
|
||
ID int64 `gorm:"column:id;primaryKey"` // 主键
|
||
SysOrigin string `gorm:"column:sys_origin;size:32;uniqueIndex:uk_hotgame_catalog_sys_profile_vendor_game,priority:1;index:idx_hotgame_catalog_profile_internal_game,priority:1"` // 系统标识
|
||
Profile string `gorm:"column:profile;size:32;default:PROD;uniqueIndex:uk_hotgame_catalog_sys_profile_vendor_game,priority:2;index:idx_hotgame_catalog_profile_internal_game,priority:2"` // 配置环境:PROD/TEST
|
||
InternalGameID string `gorm:"column:internal_game_id;size:64;index:idx_hotgame_catalog_profile_internal_game,priority:3"` // app 内部游戏 ID
|
||
VendorGameID string `gorm:"column:vendor_game_id;size:64;uniqueIndex:uk_hotgame_catalog_sys_profile_vendor_game,priority:3"` // 热游游戏 ID
|
||
Name string `gorm:"column:name;size:128"` // 游戏名称
|
||
Cover string `gorm:"column:cover;size:1024"` // 封面地址
|
||
PreviewURL string `gorm:"column:preview_url;size:1024"` // 七分屏/预览入口
|
||
DownloadURL string `gorm:"column:download_url;size:1024"` // 实际启动入口
|
||
PackageVersion string `gorm:"column:package_version;size:32"` // 版本号
|
||
RawJSON string `gorm:"column:raw_json;type:longtext"` // 原始目录 JSON
|
||
Status string `gorm:"column:status;size:32;index:idx_hotgame_catalog_profile_internal_game,priority:4"` // 目录状态
|
||
CreateTime time.Time `gorm:"column:create_time"` // 创建时间
|
||
UpdateTime time.Time `gorm:"column:update_time"` // 更新时间
|
||
}
|
||
|
||
// TableName 返回热游目录表名。
|
||
func (HotgameGameCatalog) TableName() string { return "hotgame_game_catalog" }
|