Files
bl/modules/player/model/fightinfo.go

33 lines
830 B
Go
Raw Normal View History

package model
import "blazing/cool"
// PVPMatchRecord PVP单场记录
// 记录每一场的详细信息,便于复盘和统计
type PVPMatchRecord struct {
*cool.Model
Noteinfo NoteReadyToFightInfo `gorm:"type:jsonb; " ` //携带信息
FightOver FightOverInfo `gorm:"type:jsonb; " ` //结束信息
//ScoreChange int32 `json:"score_change"` // 本场积分变化(+10/-5等
// WinStreak uint32 `json:"win_streak"` // 本场结束后的连胜数
}
// 表名常量
const TableNameFightinfo = "player_fight_info"
// TableName 返回表名
func (*PVPMatchRecord) TableName() string {
return TableNameFightinfo
}
// GroupName 返回表组名
func (*PVPMatchRecord) GroupName() string {
return "default"
}
// init 程序启动时自动创建表
func init() {
cool.CreateTable(&PVPMatchRecord{})
}