merchant.active.config.go 1.8 KB

1234567891011121314151617181920212223242526
  1. package shanghu
  2. import (
  3. "time"
  4. )
  5. // 活动中奖配置,拼团配置,秒杀配置
  6. type MerchantActiveConfig struct {
  7. ID int64 `gorm:"column:id;type:bigint(20);primary_key;AUTO_INCREMENT" json:"id"`
  8. ConfigMode int `gorm:"column:config_mode;type:int(11)" json:"config_mode"` // 模式 1-默认模式
  9. MerchantOpenID string `gorm:"column:merchant_open_id;type:varchar(255)" json:"merchant_open_id"` // openid
  10. DrawMode int `gorm:"column:draw_mode;type:int(11);default:0" json:"draw_mode"` // 抽奖模式 0-不抽奖,1-盲盒
  11. DrawOneBiZhong int64 `gorm:"column:draw_one_bi_zhong;type:bigint(20)" json:"draw_one_bi_zhong"` // 首次必中抽奖商品ID
  12. DrawProduct string `gorm:"column:draw_product;type:json" json:"draw_product"` // 抽奖商品 商品ID 与中奖率
  13. CreateBy int64 `gorm:"column:create_by;type:bigint(20)" json:"create_by"` // 创建者
  14. UpdateBy int64 `gorm:"column:update_by;type:bigint(20)" json:"update_by"` // 更新者
  15. CreatedAt time.Time `gorm:"column:created_at;type:datetime(3)" json:"created_at"` // 创建时间
  16. UpdatedAt time.Time `gorm:"column:updated_at;type:datetime(3)" json:"updated_at"` // 最后更新时间
  17. DeletedAt time.Time `gorm:"column:deleted_at;type:datetime(3)" json:"deleted_at"` // 删除时间
  18. GroupBuyMode int `gorm:"column:group_buy_mode;type:int(11);default:null" json:"group_buy_mode"` // 0-不开团 1-虚拟开团 2-真实开团
  19. GroupBuy string `gorm:"column:group_buy;type:json" json:"group_buy"` // 开团配置
  20. }
  21. func (m *MerchantActiveConfig) TableName() string {
  22. return "merchant_active_config"
  23. }