package dto import ( "apigame/service/constd" "apigame/util/util-lx/lxtime" "fmt" ) // CardHolderRecordGetNew 开卡包活动日志获得卡包 type CardHolderRecordGetNew struct { Id int64 `orm:"auto"` // 日志ID Uid int64 // 玩家唯一ID ActivityId int64 // 当前活动ID Round int // 当前轮次 CardholderId int // 卡包ID CardholderCount int // 卡包数量 CreateTime int64 // 创建时间戳 UpdateTime int64 // 修改时间戳 } func (d *CardHolderRecordGetNew) TableName(gameId string) string { return constd.MYSQL_TABLE_S_CARDHOLDER_RECORD_GETNEW + gameId } func (d *CardHolderRecordGetNew) CreateSqlPath() string { return constd.MYSQL_TABLE_S_CARDHOLDER_RECORD_GETNEW } func (d *CardHolderRecordGetNew) SqlPairs() map[string]string { m := make(map[string]string) m["uid"] = fmt.Sprintf("%d", d.Uid) m["activity_id"] = fmt.Sprintf("%d", d.ActivityId) m["round"] = fmt.Sprintf("%d", d.Round) m["cardholder_id"] = fmt.Sprintf("%d", d.CardholderId) m["cardholder_count"] = fmt.Sprintf("%d", d.CardholderCount) m["create_time"] = fmt.Sprintf("%d", d.CreateTime) m["update_time"] = fmt.Sprintf("%d", d.UpdateTime) return m } func NewCardHolderRecordGetNew(uid int64, activityId int64, round int, cardholderId int, cardholderCount int) *CardHolderRecordGetNew { secNow := lxtime.NowUninx() return &CardHolderRecordGetNew{ CreateTime: secNow, UpdateTime: secNow, Uid: uid, ActivityId: activityId, Round: round, CardholderId: cardholderId, CardholderCount: cardholderCount, } } // CardHolderRecordOpen 开卡包活动日志开卡包 type CardHolderRecordOpen struct { Id int64 `orm:"auto"` // 日志ID Uid int64 // 玩家唯一ID ActivityId int64 // 当前活动ID Round int // 当前轮次 CardholderId int // 卡包ID CardList string // 开卡内容 CreateTime int64 // 创建时间戳 UpdateTime int64 // 修改时间戳 } func (d *CardHolderRecordOpen) TableName(gameId string) string { return constd.MYSQL_TABLE_S_CARDHOLDER_RECORD_OPEN + gameId } func (d *CardHolderRecordOpen) CreateSqlPath() string { return constd.MYSQL_TABLE_S_CARDHOLDER_RECORD_OPEN } func (d *CardHolderRecordOpen) SqlPairs() map[string]string { m := make(map[string]string) m["uid"] = fmt.Sprintf("%d", d.Uid) m["activity_id"] = fmt.Sprintf("%d", d.ActivityId) m["round"] = fmt.Sprintf("%d", d.Round) m["cardholder_id"] = fmt.Sprintf("%d", d.CardholderId) m["card_list"] = fmt.Sprintf("'%s'", d.CardList) m["create_time"] = fmt.Sprintf("%d", d.CreateTime) m["update_time"] = fmt.Sprintf("%d", d.UpdateTime) return m } func NewCardHolderRecordOpen(uid int64, activityId int64, round int, cardholderId int, cardList string) *CardHolderRecordOpen { secNow := lxtime.NowUninx() return &CardHolderRecordOpen{ CreateTime: secNow, UpdateTime: secNow, Uid: uid, ActivityId: activityId, Round: round, CardholderId: cardholderId, CardList: cardList, } } // CardHolderRecordRewardAlbum 开卡包活动日志领取卡组奖励 type CardHolderRecordRewardAlbum struct { Id int64 `orm:"auto"` // 日志ID Uid int64 // 玩家唯一ID ActivityId int64 // 当前活动ID Round int // 当前轮次 AlbumId int // 卡组ID Award string // 奖励内容 CreateTime int64 // 创建时间戳 UpdateTime int64 // 修改时间戳 } func (d *CardHolderRecordRewardAlbum) TableName(gameId string) string { return constd.MYSQL_TABLE_S_CARDHOLDER_RECORD_REWARDALBUM + gameId } func (d *CardHolderRecordRewardAlbum) CreateSqlPath() string { return constd.MYSQL_TABLE_S_CARDHOLDER_RECORD_REWARDALBUM } func (d *CardHolderRecordRewardAlbum) SqlPairs() map[string]string { m := make(map[string]string) m["uid"] = fmt.Sprintf("%d", d.Uid) m["activity_id"] = fmt.Sprintf("%d", d.ActivityId) m["round"] = fmt.Sprintf("%d", d.Round) m["album_id"] = fmt.Sprintf("%d", d.AlbumId) m["award"] = fmt.Sprintf("'%s'", d.Award) m["create_time"] = fmt.Sprintf("%d", d.CreateTime) m["update_time"] = fmt.Sprintf("%d", d.UpdateTime) return m } func NewCardHolderRecordRewardAlbum(uid int64, activityId int64, round int, albumId int, award string) *CardHolderRecordRewardAlbum { secNow := lxtime.NowUninx() return &CardHolderRecordRewardAlbum{ CreateTime: secNow, UpdateTime: secNow, Uid: uid, ActivityId: activityId, Round: round, AlbumId: albumId, Award: award, } } // CardHolderRecordRewardRound 开卡包活动日志领取轮次奖励 type CardHolderRecordRewardRound struct { Id int64 `orm:"auto"` // 日志ID Uid int64 // 玩家唯一ID ActivityId int64 // 当前活动ID Round int // 当前轮次 Award string // 奖励内容 CreateTime int64 // 创建时间戳 UpdateTime int64 // 修改时间戳 } func (d *CardHolderRecordRewardRound) TableName(gameId string) string { return constd.MYSQL_TABLE_S_CARDHOLDER_RECORD_REWARDROUND + gameId } func (d *CardHolderRecordRewardRound) CreateSqlPath() string { return constd.MYSQL_TABLE_S_CARDHOLDER_RECORD_REWARDROUND } func (d *CardHolderRecordRewardRound) SqlPairs() map[string]string { m := make(map[string]string) m["uid"] = fmt.Sprintf("%d", d.Uid) m["activity_id"] = fmt.Sprintf("%d", d.ActivityId) m["round"] = fmt.Sprintf("%d", d.Round) m["award"] = fmt.Sprintf("'%s'", d.Award) m["create_time"] = fmt.Sprintf("%d", d.CreateTime) m["update_time"] = fmt.Sprintf("%d", d.UpdateTime) return m } func NewCardHolderRecordRewardRound(uid int64, activityId int64, round int, award string) *CardHolderRecordRewardRound { secNow := lxtime.NowUninx() return &CardHolderRecordRewardRound{ CreateTime: secNow, UpdateTime: secNow, Uid: uid, ActivityId: activityId, Round: round, Award: award, } }