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.
28 lines
900 B
28 lines
900 B
package models
|
|
|
|
import (
|
|
"github.com/ouxuanserver/osmanthuswine/src/core"
|
|
"time"
|
|
)
|
|
|
|
const SignUpTableName = TableNamePrefix + "sign_up"
|
|
|
|
type SignUp struct {
|
|
Id int64 `json:"id"`
|
|
ActivityId int64 `json:"activity_id"`
|
|
Title string `json:"title"`
|
|
MaxModel string `json:"max_model"`
|
|
OnlyInvitation int `json:"only_invitation"`
|
|
LogoUrl string `json:"logo_url"`
|
|
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 SignUpTableName
|
|
}
|
|
|
|
func (t *SignUp) GetByActivityId(aid int64) (bool, error) {
|
|
return core.GetXormAuto().Where("is_delete=0 and activity_id=?", aid).Get(t)
|
|
}
|