This commit is contained in:
2026-01-19 21:10:35 +08:00
parent c868422a1d
commit a8ec1a5aa1
29 changed files with 247 additions and 282 deletions

View File

@@ -62,7 +62,7 @@ type (
Id string `db:"id"`
Code string `db:"code"` // 邀请码(唯一)
AgentId sql.NullString `db:"agent_id"`
TargetLevel int64 `db:"target_level"` // 目标等级1=普通2=黄金3=钻石
TargetLevel int64 `db:"target_level"` // 目标等级1=白银2=黄金3=钻石
Status int64 `db:"status"` // 状态0=未使用1=已使用2=已失效(所有邀请码只能使用一次,使用后立即失效)
UsedUserId sql.NullString `db:"used_user_id"`
UsedAgentId sql.NullString `db:"used_agent_id"`

View File

@@ -62,7 +62,7 @@ type (
Code string `db:"code"` // 邀请码(冗余字段,便于查询)
UserId string `db:"user_id"`
AgentId string `db:"agent_id"`
AgentLevel int64 `db:"agent_level"` // 代理等级1=普通2=黄金3=钻石
AgentLevel int64 `db:"agent_level"` // 代理等级1=白银2=黄金3=钻石
UsedTime time.Time `db:"used_time"` // 使用时间
CreateTime time.Time `db:"create_time"` // 创建时间
UpdateTime time.Time `db:"update_time"` // 更新时间

View File

@@ -64,7 +64,7 @@ type (
Id string `db:"id"`
UserId string `db:"user_id"`
AgentCode int64 `db:"agent_code"` // 代理编码从16800开始递增
Level int64 `db:"level"` // 代理等级1=普通2=黄金3=钻石
Level int64 `db:"level"` // 代理等级1=白银2=黄金3=钻石
Region sql.NullString `db:"region"` // 区域(可选)
Mobile string `db:"mobile"` // 手机号(加密)
WechatId sql.NullString `db:"wechat_id"` // 微信号

View File

@@ -59,8 +59,8 @@ type (
AgentUpgrade struct {
Id string `db:"id"`
AgentId string `db:"agent_id"`
FromLevel int64 `db:"from_level"` // 原等级1=普通2=黄金3=钻石
ToLevel int64 `db:"to_level"` // 目标等级1=普通2=黄金3=钻石
FromLevel int64 `db:"from_level"` // 原等级1=白银2=黄金3=钻石
ToLevel int64 `db:"to_level"` // 目标等级1=白银2=黄金3=钻石
UpgradeType int64 `db:"upgrade_type"` // 升级类型1=自主付费2=钻石升级下级
UpgradeFee float64 `db:"upgrade_fee"` // 升级费用
RebateAmount float64 `db:"rebate_amount"` // 返佣金额(给原直接上级)