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

29 lines
1.0 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. package models
  2. import (
  3. "github.com/ouxuanserver/osmanthuswine/src/core"
  4. "time"
  5. )
  6. const RealSignListTN = TableNamePrefix + "real_sign_list"
  7. type RealSignList struct {
  8. Id int64 `json:"id" xorm:"not null pk autoincr INT(11)"`
  9. IsDelete bool `json:"is_delete" xorm:"not null default(0) comment('是否删除') TINYINT(1)"`
  10. CreatedAt time.Time `json:"created_at" xorm:"created comment('创建时间') TIMESTAMP"`
  11. UpdatedAt time.Time `json:"updated_at" xorm:"updated comment('更新时间') TIMESTAMP"`
  12. ActivityId int64 `json:"activity_id" xorm:"not null default 0 comment('主活动id') INT(11)"`
  13. JsonList string `json:"json_list" xorm:"not null comment('名单记录') TEXT"`
  14. }
  15. func (t *RealSignList) TableName() string {
  16. return RealSignListTN
  17. }
  18. // 可能使用模糊匹配
  19. func (t *RealSignList) CheckSignIn(aid int64, ext string) (bool, error) {
  20. //var sql = fmt.Sprintf("is_delete=0 and activity_id=%d and ", aid, ext)
  21. ext += " 1 = 1 "
  22. return core.GetXormAuto().Where("is_delete=0 and activity_id=?", aid).Where(ext).Get(t)
  23. }