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.
24 lines
956 B
24 lines
956 B
package models
|
|
|
|
import "git.ouxuan.net/tommy/osmanthuswine/src/core"
|
|
|
|
const PadSignerTN = TableNamePrefix + "pad_signer"
|
|
|
|
type PadSigner struct {
|
|
Model `xorm:"extends"`
|
|
|
|
ActivityId int `json:"activity_id" xorm:"not null default 0 comment('互动id') INT(11)"`
|
|
PadSignerName string `json:"pad_signer_name" xorm:"not null default '' comment('签约方名称') VARCHAR(128)"`
|
|
PadBgUrl string `json:"pad_bg_url" xorm:"not null default '' comment('平板背景链接') VARCHAR(255)"`
|
|
Sid int `json:"sid" xorm:"not null default 0 comment('排序') INT(11)"`
|
|
WsId string `json:"ws_id" xorm:"not null default '' comment('websocket连接标识id') VARCHAR(255)"`
|
|
}
|
|
|
|
func (t *PadSigner) TableName() string {
|
|
return PadSignerTN
|
|
}
|
|
|
|
func ListPadSignerByActivityId(activityId int) (signers []*PadSigner, err error) {
|
|
err = core.GetXormAuto().Where("activity_id=? and is_delete=0", activityId).Asc("sid").Find(&signers)
|
|
return
|
|
}
|