yumi-golang/internal/model/game_open_models.go
2026-04-22 19:57:28 +08:00

26 lines
2.6 KiB
Go

package model
import "time"
// GameOpenCallbackLog 保存统一三方游戏回调日志。
type GameOpenCallbackLog struct {
ID int64 `gorm:"column:id;primaryKey"` // 主键
RequestType string `gorm:"column:request_type;size:32;index:idx_game_open_log_type_time,priority:1"` // 回调类型
SysOrigin string `gorm:"column:sys_origin;size:32"` // 系统标识
OrderID string `gorm:"column:order_id;size:128;index:idx_game_open_log_order"` // 订单号
GameID string `gorm:"column:game_id;size:64"` // 游戏 ID
RoundID string `gorm:"column:round_id;size:128"` // 局号
RoomID string `gorm:"column:room_id;size:64"` // 房间 ID
UserID *int64 `gorm:"column:user_id;index:idx_game_open_log_user_time,priority:1"` // 用户 ID
RequestJSON string `gorm:"column:request_json;type:longtext"` // 请求报文
ResponseJSON string `gorm:"column:response_json;type:longtext"` // 响应报文
BizCode int `gorm:"column:biz_code"` // 业务状态码
BizMessage string `gorm:"column:biz_message;type:text"` // 业务说明
Status string `gorm:"column:status;size:32"` // 处理状态
CreateTime time.Time `gorm:"column:create_time;index:idx_game_open_log_type_time,priority:2;index:idx_game_open_log_user_time,priority:2"` // 创建时间
UpdateTime time.Time `gorm:"column:update_time"` // 更新时间
}
// TableName 返回统一游戏开放接口日志表名。
func (GameOpenCallbackLog) TableName() string { return "game_open_callback_log" }