package dbmodel import ( "time" "github.com/shopspring/decimal" "gorm.io/gorm" ) type Record struct { ID uint `gorm:"primaryKey"` TxHash string `gorm:"type:varchar(255);uniqueIndex;not null;comment:交易hash"` Address string `gorm:"type:varchar(255);not null;comment:用户地址"` ClaimedAmount decimal.Decimal `gorm:"type:decimal(65,0);not null;comment:领取数量"` TotalAmount decimal.Decimal `gorm:"type:decimal(65,0);not null;comment:总奖励数量"` Timestamp int64 `gorm:"not null;comment:领取区块时间"` CreatedAt time.Time UpdatedAt time.Time DeletedAt gorm.DeletedAt `gorm:"index"` } type Height struct { Key string `gorm:"primaryKey"` IntValue int `gorm:"type:int;not null"` // 配置value }