互动
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.

34 lines
1.8 KiB

5 years ago
  1. package models
  2. import (
  3. "time"
  4. )
  5. const OrderDrawRecordTableName = TableNamePrefix + "order_draw_record"
  6. type OrderDrawRecord struct {
  7. Id int64 `json:"id" xorm:"not null pk autoincr"`
  8. UserPrizeId int64 `json:"user_prize_id" xorm:"not null comment('用户奖品表id') INT(11)"`
  9. ActivityId int64 `json:"activity_id" xorm:"not null comment('主活动id')"`
  10. RehearsalId int64 `json:"rehearsal_id" xorm:"not null default(0) comment('彩排id/0正式')"`
  11. OrderDrawActivityId int64 `json:"order_draw_activity_id" xorm:"not null comment('订单抽奖活动id')"`
  12. OrderDrawRuleId int64 `json:"order_draw_rule_id" xorm:"not null comment('订单抽奖规则id')"`
  13. OrderDrawRuleLadderId int64 `json:"order_draw_rule_ladder_id" xorm:"not null comment('订单规则阶梯id')"`
  14. OrderDrawRuleLadder *OrderDrawRuleLadder `json:"order_draw_rule_ladder" xorm:"-"`
  15. UserId int64 `json:"user_id" xorm:"not null comment('用户id')"`
  16. User *User `json:"user" xorm:"-"`
  17. PrizeName string `json:"prize_name" xorm:"not null comment('奖品名字')"`
  18. AreaId int64 `json:"area_id" xorm:"not null default(0) comment('地区id') BIGINT(20)"`
  19. AreaName string `json:"area_name" xorm:"not null default('') comment('地区id')"`
  20. IsDelete bool `json:"-" xorm:"default(0)"`
  21. CreatedAt time.Time `json:"-" xorm:"created"`
  22. UpdatedAt time.Time `json:"-" xorm:"updated"`
  23. }
  24. func (t *OrderDrawRecord) TableName() string {
  25. return OrderDrawRecordTableName
  26. }
  27. func (t *OrderDrawRecord) Count() {
  28. }