add redeem code function

This commit is contained in:
RockYang
2024-08-08 18:28:50 +08:00
parent e54e908fbc
commit 4b717109d2
22 changed files with 635 additions and 597 deletions

16
api/store/model/redeem.go Normal file
View File

@@ -0,0 +1,16 @@
package model
import "time"
// 兑换码
type Redeem struct {
Id uint `gorm:"primarykey;column:id"`
UserId uint // 用户 ID
Name string // 名称
Power int // 算力
Code string // 兑换码
Enabled bool // 启用状态
RedeemedAt int64 // 兑换时间
CreatedAt time.Time
}

View File

@@ -1,13 +0,0 @@
package model
// 用户打赏
type Reward struct {
BaseModel
UserId uint // 用户 ID
TxId string // 交易ID
Amount float64 // 打赏金额
Remark string // 打赏备注
Status bool // 核销状态
Exchange string // 众筹兑换详情JSON
}