互动
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
2.1 KiB

5 years ago
  1. package models
  2. import (
  3. "time"
  4. )
  5. const LotteryDrawRecordTableName = TableNamePrefix + "lottery_draw_record"
  6. type LotteryDrawRecord struct {
  7. Id int64 `json:"id" xorm:"pk autoincr"`
  8. ActivityId int64 `json:"activity_id" xorm:"not null comment('主活动id')"`
  9. RehearsalId int64 `json:"rehearsal_id" xorm:"not null comment('彩排id/0正式')"`
  10. UserPrizeId int64 `json:"user_prize_id" xorm:"not null comment('用户奖品id') INT(11)"`
  11. LotteryDrawActivityId int64 `json:"lottery_draw_activity_id" xorm:"not null comment('抽奖活动id')"`
  12. LotteryDrawRuleId int64 `json:"lottery_draw_rule_id" xorm:"not null comment('抽奖规则id') BIGINT(20)"`
  13. LotteryDrawRuleLadder *LotteryDrawRuleLadder `json:"lottery_draw_rule_ladder" xorm:"-"`
  14. UserId int64 `json:"user_id" xorm:"not null comment('用户id')"`
  15. User *User `json:"user" xorm:"-"`
  16. UserName string `json:"user_name" description:"用户名" xorm:"not null comment('用户名')"`
  17. UserPhone string `json:"user_phone" description:"电话" xorm:"not null comment('电话号码')"`
  18. LotteryDrawRuleLadderId int64 `json:"lottery_draw_rule_ladder_id" xorm:"not null comment('规则阶梯id')"`
  19. PrizeName string `json:"prize_name" description:"奖品名字" xorm:"not null comment('奖品名字')"`
  20. AreaName string `json:"area_name" description:"名字" xorm:"not null comment('地区名字')"`
  21. AreaId int64 `json:"area_id" xorm:"not null default(0) comment('地区id')"`
  22. IsDelete bool `json:"-" xorm:"default(0)"`
  23. CreatedAt time.Time `json:"-" xorm:"created"`
  24. UpdatedAt time.Time `json:"-" xorm:"updated"`
  25. }
  26. func (t *LotteryDrawRecord) TableName() string {
  27. return LotteryDrawRecordTableName
  28. }