附近小店
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.

community_team_coupon.go 2.1 KiB

2 months ago
2 months ago
2 months ago
12345678910111213141516171819202122232425262728
  1. package model
  2. import (
  3. "time"
  4. )
  5. type CommunityTeamCoupon struct {
  6. Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
  7. Name string `json:"name" xorm:"comment('方案名称') VARCHAR(255)"`
  8. Comment string `json:"comment" xorm:"comment('备注') VARCHAR(2048)"`
  9. Kind int `json:"kind" xorm:"not null comment('优惠券类型,1:立减,2:满减,3折扣') TINYINT(1)"`
  10. IsReach int `json:"is_reach" xorm:"comment('是否有门槛,1:有,2:否;优惠券类型为3折扣时') TINYINT(1)"`
  11. Cal string `json:"cal" xorm:"comment('满减及折扣有门槛时算法,{"reach": "20.12", "reduce": "2.2"}, reach:满X元,减/折reduce') VARCHAR(255)"`
  12. State int `json:"state" xorm:"not null default 1 comment('1开启') TINYINT(1)"`
  13. Info string `json:"info" xorm:"not null default '0' comment('活动规则说明') VARCHAR(5000)"`
  14. Sort int `json:"sort" xorm:"comment('排序') INT(11)"`
  15. Ext string `json:"ext" xorm:"comment('拓展字段') TEXT"`
  16. CreatedTime time.Time `json:"created_time" xorm:"not null default CURRENT_TIMESTAMP comment('创建时间') DATETIME"`
  17. UpdatedTime time.Time `json:"updated_time" xorm:"not null default CURRENT_TIMESTAMP comment('更新时间') DATETIME"`
  18. StoreId int `json:"store_id" xorm:"default 0 INT(11)"`
  19. StoreType int `json:"store_type" xorm:"default 0 comment('0官方自营店 1加盟店 2连锁店') INT(11)"`
  20. Img string `json:"img" xorm:"VARCHAR(255)"`
  21. Num int `json:"num" xorm:"not null comment('剩余数量') INT(11)"`
  22. ValidTimeType int `json:"valid_time_type" xorm:"comment('有效期类型:1固定日期2领取后x天有效') TINYINT(1)"`
  23. ValidTimeStart time.Time `json:"valid_time_start" xorm:"comment('固定日期开始') DATETIME"`
  24. ValidTimeEnd time.Time `json:"valid_time_end" xorm:"comment('固定日期结束') DATETIME"`
  25. ValidDayNum int `json:"valid_day_num" xorm:"comment('领取后有效的天数') INT(11)"`
  26. }