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

package models
import (
"github.com/ouxuanserver/osmanthuswine/src/core"
"time"
)
const SignUpTN = TableNamePrefix + "sign_up"
type SignUp struct {
Id int64 `json:"id" xorm:"not null pk autoincr INT(11)"`
ActivityId int64 `json:"activity_id" xorm:"not null default(0) comment('主活动id') INT(11)"`
Title string `json:"title"`
MaxModel string `json:"max_model"`
OnlyInvitation int `json:"only_invitation"`
LogoUrl string `json:"logo_url"`
RealSignJsonForm []interface{} `json:"real_sign_json_form"`
RealSignJsonTitle []interface{} `json:"real_sign_json_title"`
SignMethod int `json:"sign_method"`
RealSignListPath string `json:"real_sign_list_path"`
IsDelete bool `json:"is_delete" xorm:"default(0)" description:"是否删除"`
CreatedAt time.Time `json:"created_at" xorm:"created" description:"创建时间"`
UpdatedAt time.Time `json:"updated_at" xorm:"updated" description:"更新时间"`
}
func (t *SignUp) TableName() string {
return SignUpTN
}
func (t *SignUp) GetByActivityId(aid int64) (bool, error) {
return core.GetXormAuto().Where("is_delete=0 and activity_id=?", aid).Get(t)
}