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.
110 lines
6.1 KiB
110 lines
6.1 KiB
|
1 year ago
|
package common
|
||
|
|
|
||
|
|
// 分享配置
|
||
|
|
type ConfigShare struct {
|
||
|
|
ID int `gorm:"primarykey"`
|
||
|
|
Level int `gorm:"column:level;type:int(11);default:0;comment:等级" web:"level"`
|
||
|
|
Bet int64 `gorm:"column:bet;type:bigint(20);default:0;comment:档次投注额" web:"bet"`
|
||
|
|
Per int64 `gorm:"column:per;type:bigint(20);default:0;comment:佣金比例,万分位" web:"per"`
|
||
|
|
}
|
||
|
|
|
||
|
|
func (c *ConfigShare) TableName() string {
|
||
|
|
return "config_share"
|
||
|
|
}
|
||
|
|
|
||
|
|
// 分享配置
|
||
|
|
type ConfigShareSys struct {
|
||
|
|
ID int `gorm:"primarykey"`
|
||
|
|
WithdrawLimit int64 `gorm:"column:withdraw_limit;type:bigint(20);default:100000000;comment:最低领取数额" web:"withdraw_limit"`
|
||
|
|
ShareRecharge int64 `gorm:"column:share_recharge;type:bigint(20);default:2000000000;comment:有效玩家充值需求" web:"share_recharge"`
|
||
|
|
ShareReward int64 `gorm:"column:share_reward;type:bigint(20);default:1000000000;comment:分享有效玩家奖励" web:"share_reward"`
|
||
|
|
FakeInviteReward int64 `gorm:"column:fake_invite_reward;type:bigint(20);default:1250000000000000;comment:虚拟邀请奖励" web:"fake_invite_reward"`
|
||
|
|
FakeBetReward int64 `gorm:"column:fake_bet_reward;type:bigint(20);default:980000000000000;comment:虚拟投注奖励" web:"fake_bet_reward"`
|
||
|
|
}
|
||
|
|
|
||
|
|
func (c *ConfigShareSys) TableName() string {
|
||
|
|
return "config_share_sys"
|
||
|
|
}
|
||
|
|
|
||
|
|
// 绑定关系
|
||
|
|
type ShareInfo struct {
|
||
|
|
ID int `gorm:"primarykey"`
|
||
|
|
UID int `gorm:"column:uid;not null;type:int(11);uniqueIndex:uid"`
|
||
|
|
Share string `gorm:"column:share;not null;type:varchar(64);uniqueIndex:share;comment:分享码"`
|
||
|
|
// UP int `gorm:"column:up;not null;type:int(11);comment:上级"`
|
||
|
|
UP1 int `gorm:"column:up1;type:int(11);default:0;comment:一级"`
|
||
|
|
UP2 int `gorm:"column:up2;type:int(11);default:0;comment:二级"`
|
||
|
|
UP3 int `gorm:"column:up3;type:int(11);default:0;comment:三级"`
|
||
|
|
ChannelID int `gorm:"column:channel_id;type:int(11);default:0;comment:渠道id"`
|
||
|
|
Invites int `gorm:"column:invites;type:int(11);default:0;comment:邀请人数"`
|
||
|
|
InvaidInvites int `gorm:"column:invalid_invites;type:int(11);default:0;comment:有效邀请人数"`
|
||
|
|
InviteReward int64 `gorm:"column:invite_reward;type:bigint(20);default:0;comment:邀请获得的奖励金额"`
|
||
|
|
BetReward int64 `gorm:"column:bet_reward;type:bigint(20);default:0;comment:邀请人下注获得的金额"`
|
||
|
|
AvailableReward int64 `gorm:"column:available_reward;type:bigint(20);default:0;comment:可支配佣金"`
|
||
|
|
Time int64 `gorm:"column:time;type:bigint(20);default:0;comment:加入的时间"`
|
||
|
|
}
|
||
|
|
|
||
|
|
// 绑定关系
|
||
|
|
// type ShareInfo struct {
|
||
|
|
// ID int `gorm:"primarykey"`
|
||
|
|
// UID int `gorm:"column:uid;not null;type:int(11);uniqueIndex:uid"`
|
||
|
|
// Share string `gorm:"column:share;not null;type:varchar(64);uniqueIndex:share;comment:分享码"`
|
||
|
|
// UP int `gorm:"column:up;not null;type:int(11);comment:上级"`
|
||
|
|
// Level int `gorm:"column:level;default:1;type:int(11);comment:等级"`
|
||
|
|
// ChannelID int `gorm:"column:channel_id;type:bigint(20);comment:渠道id"`
|
||
|
|
|
||
|
|
// Bet int64 `gorm:"column:bet;type:bigint(20);default:0;comment:待结算下注额,结算后会清零"`
|
||
|
|
// TodayBet int64 `gorm:"column:today_bet;type:bigint(20);default:0;comment:今日总下注"`
|
||
|
|
// TotalBet int64 `gorm:"column:total_bet;type:bigint(20);default:0;comment:总下注"`
|
||
|
|
|
||
|
|
// TodayAgentsBet int64 `gorm:"column:today_agents_bet;type:decimal(38);default:0;comment:团队今日下注"`
|
||
|
|
// TotalAgentsBet int64 `gorm:"column:total_agents_bet;type:decimal(38);default:0;comment:团队总下注"`
|
||
|
|
|
||
|
|
// TodayAgents int64 `gorm:"column:today_agents;type:bigint(20);default:0;comment:今日下级数量"`
|
||
|
|
// TotalAgents int64 `gorm:"column:total_agents;type:bigint(20);default:0;comment:总下级数量"`
|
||
|
|
|
||
|
|
// TodayRealAgents int64 `gorm:"column:today_real_agents;type:bigint(20);default:0;comment:今日有效下级数量"`
|
||
|
|
// TotalRealAgents int64 `gorm:"column:total_real_agents;type:bigint(20);default:0;comment:总有效下级数量"`
|
||
|
|
|
||
|
|
// TodayReward int64 `gorm:"column:today_reward;type:bigint(20);default:0;comment:今日佣金"`
|
||
|
|
// TotalReward int64 `gorm:"column:total_reward;type:bigint(20);default:0;comment:总佣金"`
|
||
|
|
|
||
|
|
// TodayUpReward int64 `gorm:"column:today_up_reward;type:bigint(20);default:0;comment:今日给上级创造的佣金"`
|
||
|
|
// AvailableReward int64 `gorm:"column:available_reward;type:bigint(20);default:0;comment:可支配佣金"`
|
||
|
|
// Time int64 `gorm:"column:time;type:bigint(20);default:0;comment:加入的时间"`
|
||
|
|
// }
|
||
|
|
|
||
|
|
func (a *ShareInfo) TableName() string {
|
||
|
|
return "share_info"
|
||
|
|
}
|
||
|
|
|
||
|
|
type ShareOrder struct {
|
||
|
|
ID int `gorm:"primarykey"`
|
||
|
|
UID int `gorm:"column:uid;not null;type:int(11)"`
|
||
|
|
CreateTime int64 `gorm:"column:create_time;type:bigint(20);comment:创建时间"`
|
||
|
|
ExamineTime int64 `gorm:"column:examine_time;type:bigint(20);default:0;comment:审核时间"`
|
||
|
|
OrderID string `gorm:"column:orderid;not null;type:varchar(255);uniqueIndex:orderid;comment:本地ID"`
|
||
|
|
Amount int64 `gorm:"column:amount;not null;type:bigint(20);comment:单位8位小数"`
|
||
|
|
ChannelID int `gorm:"column:channel_id;type:bigint(20);comment:渠道id"`
|
||
|
|
Status int `gorm:"column:status;not null;type:tinyint(4);comment:1新建,2支付完成,3发货完成,4支付失败,5取消"`
|
||
|
|
}
|
||
|
|
|
||
|
|
func (a *ShareOrder) TableName() string {
|
||
|
|
return "share_order"
|
||
|
|
}
|
||
|
|
|
||
|
|
// 机器人
|
||
|
|
type ConfigShareRobot struct {
|
||
|
|
ID int `gorm:"primarykey"`
|
||
|
|
RobotID int `gorm:"column:robot_id;type:int(11);default:0" web:"robot_id"`
|
||
|
|
Avatar string `gorm:"column:avatar;type:varchar(255);default:''" web:"avatar"`
|
||
|
|
Nick string `gorm:"column:nick;type:varchar(255);default:''" web:"nick"`
|
||
|
|
InitCash int64 `gorm:"column:init_cash;type:bigint(20);default:0;comment:初始金币" web:"init_cash"`
|
||
|
|
DayCashDown int64 `gorm:"column:day_cash_down;type:bigint(20);default:0;comment:每日增加金币数下限" web:"day_cash_down"`
|
||
|
|
DayCashUp int64 `gorm:"column:day_cash_up;type:bigint(20);default:0;comment:每日增加金币数上限" web:"day_cash_up"`
|
||
|
|
}
|
||
|
|
|
||
|
|
func (c *ConfigShareRobot) TableName() string {
|
||
|
|
return "config_share_robot"
|
||
|
|
}
|