bindbox-game/internal/repository/mysql/model/activity_draw_receipts.gen.go
邹方成 81e2fb5a75
Some checks failed
Build docker and publish / linux (1.24.5) (push) Failing after 41s
feat(activity): 实现抽奖随机承诺与验证功能
新增随机种子生成与验证逻辑,包括:
1. 添加随机承诺生成接口
2. 实现抽奖执行与验证流程
3. 新增批量用户创建与删除功能
4. 添加抽奖收据记录表
5. 完善配置管理与错误码

新增测试用例验证随机算法正确性
2025-11-15 20:39:13 +08:00

39 lines
3.3 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
package model
import (
"time"
)
const TableNameActivityDrawReceipts = "activity_draw_receipts"
// ActivityDrawReceipts 活动抽奖凭据表
type ActivityDrawReceipts struct {
ID int64 `gorm:"column:id;primaryKey;autoIncrement:true;comment:主键ID" json:"id"` // 主键ID
CreatedAt time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP(3);comment:创建时间" json:"created_at"` // 创建时间
DrawLogID int64 `gorm:"column:draw_log_id;not null;comment:抽奖日志IDactivity_draw_logs.id" json:"draw_log_id"` // 抽奖日志IDactivity_draw_logs.id
AlgoVersion string `gorm:"column:algo_version;not null;comment:算法版本" json:"algo_version"` // 算法版本
RoundID int64 `gorm:"column:round_id;not null;comment:期ID" json:"round_id"` // 期ID
DrawID int64 `gorm:"column:draw_id;not null;comment:抽奖ID" json:"draw_id"` // 抽奖ID
ClientID int64 `gorm:"column:client_id;not null;comment:客户端ID" json:"client_id"` // 客户端ID
Timestamp int64 `gorm:"column:timestamp;not null;comment:时间戳(毫秒)" json:"timestamp"` // 时间戳(毫秒)
ServerSeedHash string `gorm:"column:server_seed_hash;not null;comment:服务器种子哈希(十六进制)" json:"server_seed_hash"` // 服务器种子哈希(十六进制)
ServerSubSeed string `gorm:"column:server_sub_seed;not null;comment:服务器子种子(十六进制)" json:"server_sub_seed"` // 服务器子种子(十六进制)
ClientSeed string `gorm:"column:client_seed;not null;comment:客户端种子(十六进制)" json:"client_seed"` // 客户端种子(十六进制)
Nonce int64 `gorm:"column:nonce;not null;comment:随机数" json:"nonce"` // 随机数
ItemsRoot string `gorm:"column:items_root;not null;comment:项目根哈希(十六进制)" json:"items_root"` // 项目根哈希(十六进制)
WeightsTotal int64 `gorm:"column:weights_total;not null;comment:权重总和" json:"weights_total"` // 权重总和
SelectedIndex int32 `gorm:"column:selected_index;not null;comment:选中索引" json:"selected_index"` // 选中索引
RandProof string `gorm:"column:rand_proof;not null;comment:随机证明(十六进制)" json:"rand_proof"` // 随机证明(十六进制)
Signature string `gorm:"column:signature;comment:签名(十六进制,可选)" json:"signature"` // 签名(十六进制,可选)
ItemsSnapshot string `gorm:"column:items_snapshot;comment:项目快照JSON格式" json:"items_snapshot"` // 项目快照JSON格式
}
// TableName ActivityDrawReceipts's table name
func (*ActivityDrawReceipts) TableName() string {
return TableNameActivityDrawReceipts
}