package entity import "github.com/shopspring/decimal" // todo:用户质押信息 // 累计领取数量 // 待领取数量 累计待领取次数 // 最近一次领取时间戳 当前质押数量 当前质押价值 type StakeUserCurrentOrder struct { MysqlBaseModel ProductId int64 `json:"productId" gorm:"comment:产品ID;"` ProductName string `json:"productName" gorm:"type:varchar(64);comment:产品名称;"` UserId int64 `json:"userId" gorm:"index;comment:用户ID;"` Uid string `json:"uid" gorm:"index;uniqueIndex:idx_user_uid_merchant_id;type:varchar(64);comment:交易所ID;"` Symbol string `json:"symbol" gorm:"type:varchar(32);comment:质押币种"` // 订单信息 CumQuantity decimal.Decimal `json:"cumQuantity" gorm:"type:decimal(25,8);default:0;comment:累计质押数量"` Quantity decimal.Decimal `json:"quantity" gorm:"type:decimal(25,8);default:0;comment:当前质押数量"` CumUsdAmount decimal.Decimal `json:"cumUsdAmount" gorm:"type:decimal(25,8);default:0;comment:累计质押USD价值"` UsdAmount decimal.Decimal `json:"usdAmount" gorm:"type:decimal(25,8);default:0;comment:当前质押USD价值"` FirstPledgeDate string `json:"firstPledgeDate" gorm:"type:VARCHAR(20);comment:首次质押日"` // 赎回信息 RedeemedQuantity decimal.Decimal `json:"releaseStockQuantity" gorm:"type:decimal(25,8);default:0;comment:累计释放股票数量"` RedeemedUsdAmount decimal.Decimal `json:"releaseUsdAmount" gorm:"type:decimal(25,8);default:0;comment:累计释放USD价值"` // 产出与领取信息 LastProfitPeriod string `json:"lastProfitPeriod" gorm:"type:varchar(32);comment:最近产出期号"` AvailableQuantity decimal.Decimal `json:"availableQuantity" gorm:"type:decimal(25,8);default:0;comment:待领取数量"` AvailableUsdAmount decimal.Decimal `json:"availableUsdAmount" gorm:"type:decimal(25,8);default:0;comment:待领取价值"` CumClaimQuantity decimal.Decimal `json:"cumClaimQuantity" gorm:"type:decimal(25,8);default:0;comment:累计领取数量"` CumClaimUsdAmount decimal.Decimal `json:"cumClaimUsdAmount" gorm:"type:decimal(25,8);default:0;comment:累计领取价值"` LastClaimPeriod string `json:"lastClaimPeriod" gorm:"type:varchar(32);comment:最近领取期号"` Version int64 `json:"version" gorm:"default:0;comment:事务版本;"` ErrDesc string `json:"errDesc" gorm:"type:text;comment:最近一次错误信息备注"` } func (*StakeUserCurrentOrder) TableName() string { return ModelPrefix + "stake_user_current_order" } func (*StakeUserCurrentOrder) Comment() string { return "用户活期质押聚合信息" } func NewStakeUserCurrentOrder() *StakeUserCurrentOrder { return &StakeUserCurrentOrder{} }