41 lines
963 B
Go
41 lines
963 B
Go
package model
|
|
|
|
import "time"
|
|
import "github.com/globalsign/mgo/bson"
|
|
|
|
// 破产金领取详情
|
|
type ReliefFundLog struct {
|
|
LogId bson.ObjectId `bson:"_id"`
|
|
SnId int32 //玩家id
|
|
Platform string //平台名称
|
|
Channel string // 渠道
|
|
|
|
CreateTime int64 // 注册时间
|
|
Ts int64 // 领取时间
|
|
GetType int32 // 领取方式 4:广告 5:破产补助
|
|
CoinType int32 //货币类型 0金币 1钻石
|
|
GetAmount int64 // 领取金额
|
|
}
|
|
|
|
func NewReliefFundLog() *ReliefFundLog {
|
|
log := &ReliefFundLog{LogId: bson.NewObjectId()}
|
|
return log
|
|
}
|
|
|
|
func NewReliefFundLogEx(snid int32, gettype, cointype int32, getamount, createtime int64, platform, channel string) *ReliefFundLog {
|
|
cl := NewReliefFundLog()
|
|
cl.SnId = snid
|
|
cl.Platform = platform
|
|
cl.Channel = channel
|
|
|
|
now := time.Now()
|
|
cl.Ts = now.Unix()
|
|
cl.CreateTime = createtime
|
|
|
|
cl.GetType = gettype
|
|
cl.CoinType = cointype
|
|
cl.GetAmount = getamount
|
|
|
|
return cl
|
|
}
|