package entity import "github.com/shopspring/decimal" // 用户收益信息 // UserProfit 用户收益统计表 - 从UserQuota表中分离出来减少表压力 type UserProfit struct { MysqlTimeModel UserId int64 `json:"userId" gorm:"primarykey;not null;comment:用户ID"` Uid string `json:"uid" gorm:"unique;index;type:varchar(64);comment:交易所ID"` // 日任务 节点收益统计 NodeProfitQuantity decimal.Decimal `json:"nodeProfitQuantity" gorm:"type:decimal(25,8);default:0;comment:累计节点产出系统币"` NodeProfitUsdAmount decimal.Decimal `json:"nodeProfitUsdAmount" gorm:"type:decimal(25,8);default:0;comment:累计节点产出USD价值"` // 日任务 todo: 各种排名收益指标 // todo: 动态收益 -- 实际到账 TodayDynamicProfitQuantity decimal.Decimal `json:"todayDynamicProfitQuantity" gorm:"type:decimal(25,8);default:0;comment:当日动态奖励产出系统币"` DynamicProfitQuantity decimal.Decimal `json:"dynamicProfitQuantity" gorm:"type:decimal(25,8);default:0;comment:累计动态奖励系统币"` DynamicProfitUsdAmount decimal.Decimal `json:"dynamicProfitUsdAmount" gorm:"type:decimal(25,8);default:0;comment:累计动态奖励USD价值"` // todo: 静态收益 -- 已领取 实际到资产钱包 StaticProfitQuantity decimal.Decimal `json:"staticProfitQuantity" gorm:"type:decimal(25,8);default:0;comment:累计静态产出系统币"` StaticProfitUsdAmount decimal.Decimal `json:"staticProfitUsdAmount" gorm:"type:decimal(25,8);default:0;comment:累计静态产出USD价值"` // 总收益币+USD价值 TotalProfitQuantity decimal.Decimal `json:"totalProfitQuantity" gorm:"type:decimal(25,8);default:0;comment:总收益币"` TotalProfitUsd decimal.Decimal `json:"totalProfitUsd" gorm:"type:decimal(25,8);default:0;comment:总收益USD价值"` } func (*UserProfit) TableName() string { return ModelPrefix + "user_profit" } func (*UserProfit) Comment() string { return "用户收益统计表" } func NewUserProfit() *UserProfit { return &UserProfit{} }