redeem_code.gen.go 2.3 KB

123456789101112131415161718192021222324252627282930
  1. // Code generated by gorm.io/gen. DO NOT EDIT.
  2. // Code generated by gorm.io/gen. DO NOT EDIT.
  3. // Code generated by gorm.io/gen. DO NOT EDIT.
  4. package model
  5. const TableNameRedeemCode = "redeem_code"
  6. // RedeemCode mapped from table <redeem_code>
  7. type RedeemCode struct {
  8. ID int64 `gorm:"column:id;type:bigint(20);primaryKey;autoIncrement:true" json:"id"`
  9. Sn string `gorm:"column:sn;type:varchar(32);not null" json:"sn"` // 批次编号
  10. Name string `gorm:"column:name;type:varchar(128);not null" json:"name"` // 批次名称
  11. Cdk string `gorm:"column:cdk;type:varchar(32);index:cdk,priority:1" json:"cdk"` // 兑换码
  12. ServerIds string `gorm:"column:server_ids;type:varchar(512)" json:"server_ids"` // 服务器
  13. TypeID int64 `gorm:"column:type_id;type:bigint(20);default:1" json:"type_id"` // 类型ID,1全部玩家,2指定玩家
  14. Openid string `gorm:"column:openid;type:longtext" json:"openid"` // openid,多个用,隔开
  15. Times int64 `gorm:"column:times;type:bigint(20);not null;default:1" json:"times"` // 可用次数
  16. ExpiredAt int32 `gorm:"column:expired_at;type:int(11);not null" json:"expired_at"` // 过期时间
  17. Award string `gorm:"column:award;type:mediumtext" json:"award"` // 奖励配置
  18. Date string `gorm:"column:date;type:date;not null" json:"date"` // 生成日期
  19. Operator string `gorm:"column:operator;type:varchar(64);not null" json:"operator"` // 操作人
  20. CreatedAt int64 `gorm:"column:created_at;type:bigint(20);not null" json:"created_at"` // 生成时间
  21. Status int32 `gorm:"column:status;type:int(11);not null;index:redeem_code_status_index,priority:1;default:1" json:"status"` // 是否生效 1是 2否
  22. }
  23. // TableName RedeemCode's table name
  24. func (*RedeemCode) TableName() string {
  25. return TableNameRedeemCode
  26. }