You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
210 lines
15 KiB
210 lines
15 KiB
package values |
|
|
|
// User 后台用户 |
|
type User struct { |
|
Name string `gorm:"column:name;type:varchar(32);uniqueIndex:name;not null;comment:名字" json:"Name"` |
|
Account string `gorm:"column:account;type:varchar(32);uniqueIndex:account;not null;comment:账号" json:"Account"` |
|
Password string `gorm:"column:password;type:varchar(32);not null;comment:密码" json:"Password"` |
|
ID uint `gorm:"primarykey"` |
|
Role int `gorm:"column:role;type:tinyint(4);not null;comment:角色" json:"Role"` |
|
Power string `gorm:"column:power;type:varchar(512);not null;comment:权限" json:"Power"` |
|
PowerMap map[int][]int `gorm:"-" json:"PowerMap"` |
|
Phone string `gorm:"column:phone;type:varchar(32);uniqueIndex:phone;comment:手机号" json:"Phone"` |
|
Channels string `gorm:"column:channels;type:varchar(512);not null;comment:拥有权限的包,为空时代表所有包都有权限" json:"Channels"` |
|
SChannels []int `gorm:"-"` |
|
} |
|
|
|
func (u *User) TableName() string { |
|
return "users" |
|
} |
|
|
|
// EditHistory 后台修改操作历史 |
|
// Operator 操作人 |
|
// Detail 修改内容 |
|
// Time 时间 |
|
// Model 操作模块,与权限列表对应 |
|
type EditHistory struct { |
|
Operator string `gorm:"column:operator;type:varchar(32);not null;comment:操作人" json:"Operator"` |
|
Detail string `gorm:"column:detail;type:varchar(256);not null;comment:修改明细" json:"Detail"` |
|
ID uint `gorm:"primarykey" json:"-"` |
|
Time int64 `gorm:"column:time;type:bigint(20);default:0;comment:操作时间" json:"Time"` |
|
UID int `gorm:"column:uid;type:int(11);comment:操作人id" json:"UID"` |
|
Model int `gorm:"column:model;type:int(11);comment:操作功能模块" json:"Model"` |
|
} |
|
|
|
func (e *EditHistory) TableName() string { |
|
return "edit_history" |
|
} |
|
|
|
// Role 后台角色 |
|
// Role 角色等级 1是超管 |
|
// Power 权限 |
|
// Name 角色名 |
|
type Role struct { |
|
ID uint `gorm:"primarykey"` |
|
Role int `gorm:"column:role;type:tinyint(4);uniqueIndex:role;not null;comment:角色等级" json:"Role"` |
|
Power string `gorm:"column:power;type:varchar(512);not null;comment:权限" json:"Power"` |
|
Name string `gorm:"column:name;type:varchar(32);uniqueIndex:name;not null;comment:角色名" json:"Name"` |
|
} |
|
|
|
func (u *Role) TableName() string { |
|
return "role" |
|
} |
|
|
|
type ReviewData struct { |
|
ID uint `gorm:"primarykey"` |
|
Date string `gorm:"column:Date;type:varchar(64);not null;comment:日期"` |
|
Time int64 `gorm:"column:Time;type:bigint(20);uniqueIndex:tid;not null;comment:时间"` |
|
PlatformID int `gorm:"column:PlatformID;type:int(11);uniqueIndex:tid;not null;comment:渠道号"` |
|
DownloadCount int64 `gorm:"column:DownloadCount;type:int(11);default:0;comment:安装数"` |
|
ActiveCount int64 `gorm:"column:ActiveCount;type:int(11);default:0;comment:活跃人数"` |
|
NewCount int64 `gorm:"column:NewCount;type:int(11);default:0;comment:新增人数"` |
|
NewRegisterPer string `gorm:"column:NewRegisterPer;type:varchar(64);default:'';comment:新增注册率"` |
|
FirstPayCount int64 `gorm:"column:FirstPayCount;type:int(11);default:0;comment:首次付费人数"` |
|
FirstPayPer string `gorm:"column:FirstPayPer;type:varchar(64);default:'';comment:首充付费率"` |
|
NewPayCount int64 `gorm:"column:NewPayCount;type:int(11);default:0;comment:新增付费人数"` |
|
NewPayRepeatCount int64 `gorm:"column:NewPayRepeatCount;default:0;type:int(11);comment:新增付费复充人数"` |
|
NewPayPer string `gorm:"column:NewPayPer;type:varchar(64);default:'';comment:新增付费率"` |
|
NewPayAmount int64 `gorm:"column:NewPayAmount;type:bigint(20);default:0;comment:新增付费金额"` |
|
ActivePayCount int64 `gorm:"column:ActivePayCount;type:int(11);default:0;comment:活跃付费人数"` |
|
RechargeTotal int64 `gorm:"column:RechargeTotal;type:bigint(20);default:0;comment:总付费"` |
|
NewPayPerTotal string `gorm:"column:NewPayPerTotal;type:varchar(64);default:'';comment:新增充值占比"` |
|
WithdrawPlayerNum int64 `gorm:"column:WithdrawPlayerNum;type:int(11);default:0;comment:赠送人数"` |
|
WithdrawTotal int64 `gorm:"column:WithdrawTotal;type:bigint(20);default:0;comment:总赠送"` |
|
PayWithdrawDiff int64 `gorm:"column:PayWithdrawDiff;type:bigint(20);default:0;comment:充值赠送差"` |
|
WithdrawPer string `gorm:"column:WithdrawPer;type:varchar(64);default:'';comment:赠送比例"` |
|
RTP string `gorm:"column:RTP;type:varchar(64);default:'0%';comment:总返奖/总下注"` |
|
ChannelFee int64 `gorm:"column:ChannelFee;type:bigint(20);default:6;comment:支付费率,千分位"` |
|
ADFee int64 `gorm:"column:ADFee;type:bigint(20);default:0;comment:广告费"` |
|
ROI string `gorm:"column:ROI;type:varchar(64);default:'0%';comment:毛利/广告费*%"` |
|
Profit string `gorm:"column:Profit;type:varchar(64);default:'0';comment:毛利"` |
|
Remark string `gorm:"column:Remark;type:varchar(256);default:'';comment:备注"` |
|
Check bool `gorm:"column:Check;type:tinyint(4);default:0;comment:数据是否已确认(当天数据实时变化)"` |
|
} |
|
|
|
func (u *ReviewData) TableName() string { |
|
return "ReviewData" |
|
} |
|
|
|
type FirstPageData struct { |
|
ID uint `gorm:"primarykey"` |
|
Date string `gorm:"column:Date;type:varchar(64);not null;comment:日期"` |
|
Time int64 `gorm:"column:Time;type:bigint(20);uniqueIndex:tid;not null;comment:时间"` |
|
PlatformID int `gorm:"column:PlatformID;type:int(11);uniqueIndex:tid;not null;comment:渠道号"` |
|
NewCount int64 `gorm:"column:NewCount;type:int(11);default:0;comment:新增人数"` |
|
NewPayCount int64 `gorm:"column:NewPayCount;type:int(11);default:0;comment:新增付费人数"` |
|
NewPayRepeatCount int64 `gorm:"column:NewPayRepeatCount;default:0;type:int(11);comment:新增付费复充人数"` |
|
RechargeTotal int64 `gorm:"column:RechargeTotal;type:bigint(20);default:0;comment:总付费"` |
|
WithdrawTotal int64 `gorm:"column:WithdrawTotal;type:bigint(20);default:0;comment:总赠送"` |
|
RechargeOrderCreate int64 `gorm:"column:RechargeOrderCreate;type:int(11);default:0;comment:发起充值订单总数"` |
|
RechargeOrderFinish int64 `gorm:"column:RechargeOrderFinish;type:int(11);default:0;comment:完成充值订单总数"` |
|
WithdrawOrderCreate int64 `gorm:"column:WithdrawOrderCreate;type:int(11);default:0;comment:发起赠送订单总数"` |
|
WithdrawOrderFinish int64 `gorm:"column:WithdrawOrderFinish;type:int(11);default:0;comment:完成赠送订单总数"` |
|
RechargeSuccessPer string `gorm:"column:RechargeSuccessPer;type:varchar(64);default:'';comment:充值成功率"` |
|
WithdrawPer string `gorm:"column:WithdrawPer;type:varchar(64);default:'';comment:赠送比例"` |
|
RTP string `gorm:"column:RTP;type:varchar(64);default:'0%';comment:平台"` |
|
ProviderRTP string `gorm:"column:ProviderRTP;type:varchar(64);default:'0%';comment:厂商"` |
|
Bet int64 `gorm:"column:Bet;type:bigint(20);default:0;comment:总下注"` |
|
Settle int64 `gorm:"column:Settle;type:bigint(20);default:0;comment:总返奖"` |
|
ProviderBet int64 `gorm:"column:ProviderBet;type:bigint(20);default:0;comment:厂商下注"` |
|
ProviderSettle int64 `gorm:"column:ProviderSettle;type:bigint(20);default:0;comment:厂商返奖"` |
|
Check bool `gorm:"column:Check;type:tinyint(4);default:0;comment:数据是否已确认(当天数据实时变化)"` |
|
} |
|
|
|
func (u *FirstPageData) TableName() string { |
|
return "FirstPageData" |
|
} |
|
|
|
type PlatformData struct { |
|
ID uint `gorm:"primarykey"` |
|
Date string `gorm:"column:Date;type:varchar(64);not null;comment:日期"` |
|
Time int64 `gorm:"column:Time;type:bigint(20);uniqueIndex:tid;not null;comment:时间"` |
|
PlatformID int `gorm:"column:PlatformID;type:int(11);uniqueIndex:tid;not null;comment:渠道号"` |
|
DownloadCount int64 `gorm:"column:DownloadCount;type:int(11);default:0;comment:安装数"` |
|
NewCount int64 `gorm:"column:NewCount;type:int(11);default:0;comment:新增人数"` |
|
NewRegisterPer string `gorm:"column:NewRegisterPer;type:varchar(64);default:'';comment:新增注册率"` |
|
NewPayCount int64 `gorm:"column:NewPayCount;type:int(11);default:0;comment:新增付费人数"` |
|
NewPayRepeatCount int64 `gorm:"column:NewPayRepeatCount;default:0;type:int(11);comment:新增付费复充人数"` |
|
NewPayPer string `gorm:"column:NewPayPer;type:varchar(64);default:'';comment:新增付费率"` |
|
NewPayCountAll int64 `gorm:"column:NewPayCountAll;type:int(11);default:0;comment:新增付费次数"` |
|
NewPayMultiPer string `gorm:"column:NewPayMultiPer;type:varchar(64);default:'';comment:新户复充率"` |
|
NewPayAmount int64 `gorm:"column:NewPayAmount;type:bigint(20);default:0;comment:新增付费金额"` |
|
NewPayARPPU string `gorm:"column:NewPayARPPU;type:varchar(64);default:'';comment:新增ARPPU"` |
|
NewWithdrawCount int64 `gorm:"column:NewWithdrawCount;type:int(11);default:0;comment:新增赠送人数"` |
|
NewWithdrawTotal int64 `gorm:"column:NewWithdrawTotal;type:bigint(20);default:0;comment:新增总赠送"` |
|
NewWithdrawPer string `gorm:"column:NewWithdrawPer;type:varchar(64);default:'';comment:新增赠送比例"` |
|
OldPayCount int64 `gorm:"column:OldPayCount;type:int(11);default:0;comment:老户付费人数"` |
|
OldPayCountAll int64 `gorm:"column:OldPayCountAll;type:int(11);default:0;comment:老户付费次数"` |
|
OldPayMultiPer string `gorm:"column:OldPayMultiPer;type:varchar(64);default:'';comment:老户复充率"` |
|
OldPayAmount int64 `gorm:"column:OldPayAmount;type:bigint(20);default:0;comment:老户付费金额"` |
|
OldPayARPPU string `gorm:"column:OldPayARPPU;type:varchar(64);default:'';comment:老户ARPPU"` |
|
OldWithdrawCount int64 `gorm:"column:OldWithdrawCount;type:int(11);default:0;comment:老户赠送人数"` |
|
OldWithdrawTotal int64 `gorm:"column:OldWithdrawTotal;type:bigint(20);default:0;comment:老户总赠送"` |
|
OldWithdrawPer string `gorm:"column:OldWithdrawPer;type:varchar(64);default:'';comment:老户赠送比例"` |
|
PayCount int64 `gorm:"column:PayCount;type:int(11);default:0;comment:总付费人数"` |
|
RechargeTotal int64 `gorm:"column:RechargeTotal;type:bigint(20);default:0;comment:总付费"` |
|
PayARPPU string `gorm:"column:PayARPPU;type:varchar(64);default:'';comment:总ARPPU"` |
|
WithdrawPlayerNum int64 `gorm:"column:WithdrawPlayerNum;type:int(11);default:0;comment:总赠送人数"` |
|
WithdrawTotal int64 `gorm:"column:WithdrawTotal;type:bigint(20);default:0;comment:总赠送"` |
|
WithdrawPer string `gorm:"column:WithdrawPer;type:varchar(64);default:'';comment:总赠送比例"` |
|
PlatformBet int64 `gorm:"column:PlatformBet;type:bigint(20);default:0;comment:总投注"` |
|
PlatformSettle int64 `gorm:"column:PlatformSettle;type:bigint(20);default:0;comment:总返奖"` |
|
ProviderBet int64 `gorm:"column:ProviderBet;type:bigint(20);default:0;comment:厂商投注"` |
|
ProviderSettle int64 `gorm:"column:ProviderSettle;type:bigint(20);default:0;comment:厂商返奖"` |
|
ActiveKeep string `gorm:"column:ActiveKeep;type:varchar(64);default:'';comment:活跃留存"` |
|
RechargeKeep string `gorm:"column:RechargeKeep;type:varchar(64);default:'';comment:总充值留存"` |
|
NewRechargeKeep string `gorm:"column:NewRechargeKeep;type:varchar(64);default:'';comment:新增充值留存"` |
|
Check bool `gorm:"column:Check;type:tinyint(4);default:0;comment:数据是否已确认(当天数据实时变化)"` |
|
} |
|
|
|
func (u *PlatformData) PlatformData() string { |
|
return "PlatformData" |
|
} |
|
|
|
type ADConfig struct { |
|
ID int `gorm:"primarykey"` |
|
GroupName string `gorm:"column:group_name;default:'';type:varchar(64);uniqueIndex:group_name;comment:投放组名称" web:"group_name"` |
|
Channels string `gorm:"column:channels;default:'[]';type:varchar(512);comment:分配的包" web:"channels"` |
|
} |
|
|
|
func (r *ADConfig) TableName() string { |
|
return "ad_config" |
|
} |
|
|
|
type ADStats struct { |
|
ID int `gorm:"primarykey"` |
|
Date string `gorm:"column:date;default:'';type:varchar(64);comment:日期"` |
|
Time int64 `gorm:"column:time;type:bigint(20);default:0;uniqueIndex:time_channel;comment:记录时间"` |
|
ChannelID int `gorm:"column:channel_id;default:0;type:int(11);uniqueIndex:time_channel"` |
|
Cost int64 `gorm:"column:cost;type:bigint(20);default:0;comment:消耗(美元)" web:"cost"` |
|
TotalCost int64 `gorm:"column:total_cost;type:bigint(20);default:0;comment:累计消耗(美元)" web:"TotalCost"` |
|
NewPlayers int64 `gorm:"column:new_players;type:bigint(20);default:0;comment:新增人数"` |
|
NewCost string `gorm:"column:new_cost;type:varchar(64);default:'';comment:新增成本(美元)"` |
|
NewPayCost string `gorm:"column:new_pay_cost;type:varchar(64);default:'';comment:新增付费成本(美元)"` |
|
TotalPlayers int64 `gorm:"column:total_players;type:bigint(20);default:0;comment:总用户"` |
|
NewPayPlayers int64 `gorm:"column:new_pay_players;type:bigint(20);default:0;comment:新增付费人数"` |
|
NewPayPer string `gorm:"column:new_pay_per;type:varchar(64);default:'';comment:新增付费率"` |
|
NewPay int64 `gorm:"column:new_pay;type:bigint(20);default:0;comment:新增付费"` |
|
NewPayUnit string `gorm:"column:new_pay_unit;type:varchar(64);default:'';comment:人均新增充值(卢比)"` |
|
ActivePay int64 `gorm:"column:activity_pay;type:bigint(20);default:0;comment:活跃付费"` |
|
ActivePayPlayers int64 `gorm:"column:activity_pay_players;type:bigint(20);default:0;comment:活跃付费人数"` |
|
TotalPay int64 `gorm:"column:total_pay;type:bigint(20);default:0;comment:总付费"` |
|
ARPU string `gorm:"column:arpu;type:varchar(64);default:'';comment:活跃付费arpu"` |
|
TotalWithdraw int64 `gorm:"column:total_withdraw;type:bigint(20);default:0;comment:总退出"` |
|
WithdrawPer string `gorm:"column:withdraw_per;type:varchar(64);default:'';comment:退出比"` |
|
Profit int64 `gorm:"column:profit;type:bigint(20);default:0;comment:当日收益"` |
|
TotalProfit int64 `gorm:"column:total_profit;type:bigint(20);default:0;comment:总收益"` |
|
NewROI string `gorm:"column:new_roi;type:varchar(64);default:'';comment:当日roi"` |
|
TotalROI string `gorm:"column:total_roi;type:varchar(64);default:'';comment:总roi"` |
|
NewPayROI string `gorm:"column:new_pay_roi;type:varchar(64);default:'';comment:新增roi"` |
|
|
|
NewRegister int `gorm:"column:new_register;default:0;type:int(11);comment:注册用户数"` |
|
ActiveDevice int `gorm:"column:active_device;default:0;type:int(11);comment:设备数"` |
|
NewWithdraw int64 `gorm:"column:new_withdraw;type:bigint(20);default:0;comment:新增退出"` |
|
ActiveUser int `gorm:"column:active_user;default:0;type:int(11);comment:活跃用户数"` |
|
RechargeUser int `gorm:"column:recharge_user;default:0;type:int(11);comment:付费人数"` |
|
} |
|
|
|
func (r *ADStats) TableName() string { |
|
return "ad_stats" |
|
}
|
|
|