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.2 KiB
29 lines
1.2 KiB
package models
|
|
|
|
import "git.ouxuan.net/tommy/osmanthuswine/src/core"
|
|
|
|
const PadSigningTN = TableNamePrefix + "pad_signing"
|
|
|
|
type PadSigning struct {
|
|
Model `xorm:"extends"`
|
|
|
|
ActivityId int `json:"activity_id" xorm:"not null default 0 comment('互动id') INT(11)"`
|
|
CustomerId int `json:"customer_id" xorm:"not null default 0 comment('客户id') INT(11)"`
|
|
RehearsalId int `json:"rehearsal_id" xorm:"not null default 0 comment('彩排') INT(11)"`
|
|
SignTheme string `json:"sign_theme" xorm:"not null default '' comment('签约主题') VARCHAR(255)"`
|
|
MaxBgUrl string `json:"max_bg_url" xorm:"not null default '' comment('大屏幕链接') VARCHAR(255)"`
|
|
PadSignStatus string `json:"pad_sign_status" xorm:"not null default '关闭' comment('平板签约状态开启或关闭') VARCHAR(128)" `
|
|
}
|
|
|
|
func (t *PadSigning) TableName() string {
|
|
return PadSigningTN
|
|
}
|
|
|
|
func (t *PadSigning) GetByActivityId(activityId int) (bool, error) {
|
|
return core.GetXormAuto().Where("activity_id=? and is_delete=0", activityId).Get(t)
|
|
}
|
|
|
|
func (t *PadSigning) Switch(activityId int, status string) (int64, error) {
|
|
return core.GetXormAuto().Where("activity_id=? and is_delete=0", activityId).
|
|
NoAutoCondition().Update(&PadSigning{PadSignStatus: status})
|
|
}
|