package model import "time" import "github.com/globalsign/mgo/bson" // 破产次数统计 type BankruptLog struct { LogId bson.ObjectId `bson:"_id"` SnId int32 //玩家id Channel string // 渠道 Platform string //平台名称 GameId int //游戏id GameFreeID int32 //房间id CreateTime int64 // 注册时间 UseCoin int64 // 消耗金币 Ts int64 // 破产时间 } func NewBankruptLog() *BankruptLog { log := &BankruptLog{LogId: bson.NewObjectId()} return log } func NewBankruptLogEx(snid int32, gamefreeid int32, createtime, usecoin int64, platform, channel string, gameId int) *BankruptLog { cl := NewBankruptLog() cl.SnId = snid cl.Platform = platform cl.Channel = channel cl.GameId = gameId cl.GameFreeID = gamefreeid cl.CreateTime = createtime now := time.Now() cl.Ts = now.Unix() cl.UseCoin = usecoin return cl }