178 lines
4.5 KiB
Go
178 lines
4.5 KiB
Go
package logic
|
|
|
|
type BaseLog struct {
|
|
LogType uint32 `bson:"log_type"`
|
|
LogTime int64 `bson:"log_time"`
|
|
}
|
|
|
|
const TableServerOperateLog = "server_operate_log"
|
|
|
|
type ServerOperateLog struct {
|
|
BaseLog `bson:",inline"`
|
|
ServerId uint32 `bson:"server_id"`
|
|
Operate uint32 `bson:"operate"`
|
|
Version string `bson:"version"`
|
|
ProgramHash string `bson:"program_hash"`
|
|
DataHash string `bson:"data_hash"`
|
|
ConfigHash string `bson:"config_hash"`
|
|
}
|
|
|
|
// TableServerOnlineLog 实时在线日志表
|
|
const TableServerOnlineLog = "server_online_log"
|
|
|
|
type ServerOnlineLog struct {
|
|
BaseLog `bson:",inline"`
|
|
ServerId uint32 `bson:"server_id"`
|
|
Create uint32 `bson:"create"`
|
|
Online uint32 `bson:"online"`
|
|
Offline uint32 `bson:"offline"`
|
|
MaxOnline uint32 `bson:"max_online"`
|
|
MaxOnlineTime int64 `bson:"max_online_time"`
|
|
}
|
|
|
|
type PlayerLog struct {
|
|
BaseLog `bson:",inline"`
|
|
Platform uint32 `bson:"platform"`
|
|
Channel uint32 `bson:"channel"`
|
|
ServerId uint32 `bson:"server_id"`
|
|
Machine uint32 `bson:"machine"`
|
|
AccountId uint64 `bson:"account_id"`
|
|
PlayerId uint64 `bson:"player_id"`
|
|
}
|
|
|
|
// TableCreateLog 创角日志表
|
|
const TableCreateLog = "create_log"
|
|
|
|
type CreateLog struct {
|
|
PlayerLog `bson:",inline"`
|
|
}
|
|
|
|
// TableLoginLog 登录日志表
|
|
const TableLoginLog = "login_log"
|
|
|
|
type LoginLog struct {
|
|
PlayerLog `bson:",inline"`
|
|
OptionType uint32 `bson:"option_type"`
|
|
LoginIp string `bson:"login_ip"`
|
|
}
|
|
|
|
// TableCommonLog 通用日志表
|
|
const TableCommonLog = "common_log"
|
|
|
|
type CommonLog struct {
|
|
PlayerLog `bson:",inline"`
|
|
Param1 int32 `bson:"param1"`
|
|
Param2 int32 `bson:"param2"`
|
|
Param3 int32 `bson:"param3"`
|
|
ParamStr string `bson:"param_str"`
|
|
}
|
|
|
|
// TableRechargeLog 充值日志表
|
|
const TableRechargeLog = "recharge_log"
|
|
|
|
type RechargeLog struct {
|
|
PlayerLog `bson:",inline"`
|
|
ChargeId uint32 `bson:"charge_id"`
|
|
CurrType uint32 `bson:"curr_type"`
|
|
Count uint32 `bson:"count"`
|
|
Added uint32 `bson:"added"`
|
|
LogSubtype uint32 `bson:"log_subtype"`
|
|
Money uint32 `bson:"money"`
|
|
AddTime int64 `bson:"add_time"`
|
|
Status uint32 `bson:"status"`
|
|
}
|
|
|
|
// TableLevelUpgradeLog 升级日志表
|
|
const TableLevelUpgradeLog = "level_upgrade_log"
|
|
|
|
type LevelUpgradeLog struct {
|
|
PlayerLog `bson:",inline"`
|
|
PreLevel uint32 `bson:"pre_level"`
|
|
CurLevel uint32 `bson:"cur_level"`
|
|
}
|
|
|
|
// TableItemObtainLog 物品获得日志表
|
|
const TableItemObtainLog = "item_obtain_log"
|
|
|
|
type ItemObtainLog struct {
|
|
PlayerLog `bson:",inline"`
|
|
ItemId uint32 `bson:"item_id"`
|
|
ItemNum uint32 `bson:"item_num"`
|
|
}
|
|
|
|
// TableItemConsumeLog 物品消耗日志表
|
|
const TableItemConsumeLog = "item_consume_log"
|
|
|
|
type ItemConsumeLog struct {
|
|
PlayerLog `bson:",inline"`
|
|
ItemId uint32 `bson:"item_id"`
|
|
ItemNum uint32 `bson:"item_num"`
|
|
}
|
|
|
|
// TableMoneyObtainLog 货币获取日志表
|
|
const TableMoneyObtainLog = "money_obtain_log"
|
|
|
|
type MoneyObtainLog struct {
|
|
PlayerLog `bson:",inline"`
|
|
MoneyType uint32 `bson:"money_type"`
|
|
Amount uint32 `bson:"amount"`
|
|
CurAmount uint32 `bson:"cur_amount"`
|
|
}
|
|
|
|
// TableMoneyConsumeLog 货币消耗日志表
|
|
const TableMoneyConsumeLog = "money_consume_log"
|
|
|
|
type MoneyConsumeLog struct {
|
|
PlayerLog `bson:",inline"`
|
|
MoneyType uint32 `bson:"money_type"`
|
|
Amount uint32 `bson:"amount"`
|
|
CurAmount uint32 `bson:"cur_amount"`
|
|
}
|
|
|
|
// TableMailLog 邮件记录日志表
|
|
const TableMailLog = "mail_log"
|
|
|
|
type MailLog struct {
|
|
PlayerLog `bson:",inline"`
|
|
MailId uint64 `bson:"mail_id"`
|
|
MailType uint32 `bson:"mail_type"`
|
|
RewardType uint32 `bson:"reward_type"`
|
|
Title string `bson:"title"`
|
|
Content string `bson:"content"`
|
|
Attachment string `bson:"attachment"`
|
|
SenderId uint64 `bson:"sender_id"`
|
|
SenderTime int64 `bson:"sender_time"`
|
|
}
|
|
|
|
// TableTaskLog 任务日志表
|
|
const TableTaskLog = "task_log"
|
|
|
|
type TaskLog struct {
|
|
PlayerLog `bson:",inline"`
|
|
TaskId uint32 `bson:"task_id"`
|
|
Param1 string `bson:"param1"`
|
|
Param2 string `bson:"param2"`
|
|
Param3 string `bson:"param3"`
|
|
}
|
|
|
|
// TableShopLog 商店日志表
|
|
const TableShopLog = "shop_log"
|
|
|
|
type ShopLog struct {
|
|
PlayerLog `bson:",inline"`
|
|
ShopType uint32 `bson:"shop_type"`
|
|
ItemId uint32 `bson:"item_id"`
|
|
ItemNum uint32 `bson:"item_num"`
|
|
CurrencyType int32 `bson:"currency_type"`
|
|
ConsumeNum uint32 `bson:"consume_num"`
|
|
}
|
|
|
|
// TableActivityLog 活动日志表
|
|
const TableActivityLog = "activity_log"
|
|
|
|
type ActivityLog struct {
|
|
PlayerLog `bson:",inline"`
|
|
ActivityType uint32 `bson:"activity_type"`
|
|
Status uint32 `bson:"status"`
|
|
}
|