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

35 lines
1.9 KiB

5 years ago
5 years ago
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. ArchId int `json:"arch_id" xorm:"not null default 0 comment('归档id') INT(11)"`
  17. User *User `json:"user" xorm:"-"`
  18. PrizeName string `json:"prize_name" xorm:"not null comment('奖品名字')"`
  19. AreaId int64 `json:"area_id" xorm:"not null default(0) comment('地区id') BIGINT(20)"`
  20. AreaName string `json:"area_name" xorm:"not null default('') comment('地区id')"`
  21. IsDelete bool `json:"-" xorm:"default(0)"`
  22. CreatedAt time.Time `json:"-" xorm:"created"`
  23. UpdatedAt time.Time `json:"-" xorm:"updated"`
  24. }
  25. func (t *OrderDrawRecord) TableName() string {
  26. return OrderDrawRecordTableName
  27. }
  28. func (t *OrderDrawRecord) Count() {
  29. }