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

32 lines
1.3 KiB

5 years ago
5 years ago
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 SignUpTN = TableNamePrefix + "sign_up"
  7. type SignUp struct {
  8. Id int64 `json:"id" xorm:"not null pk autoincr INT(11)"`
  9. ActivityId int64 `json:"activity_id" xorm:"not null default(0) comment('主活动id') INT(11)"`
  10. Title string `json:"title"`
  11. MaxModel string `json:"max_model"`
  12. OnlyInvitation int `json:"only_invitation"`
  13. LogoUrl string `json:"logo_url"`
  14. RealSignJsonForm []interface{} `json:"real_sign_json_form"`
  15. RealSignJsonTitle []interface{} `json:"real_sign_json_title"`
  16. SignMethod int `json:"sign_method"`
  17. RealSignListPath string `json:"real_sign_list_path"`
  18. IsDelete bool `json:"is_delete" xorm:"default(0)" description:"是否删除"`
  19. CreatedAt time.Time `json:"created_at" xorm:"created" description:"创建时间"`
  20. UpdatedAt time.Time `json:"updated_at" xorm:"updated" description:"更新时间"`
  21. }
  22. func (t *SignUp) TableName() string {
  23. return SignUpTN
  24. }
  25. func (t *SignUp) GetByActivityId(aid int64) (bool, error) {
  26. return core.GetXormAuto().Where("is_delete=0 and activity_id=?", aid).Get(t)
  27. }