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.
30 lines
1.7 KiB
30 lines
1.7 KiB
package models
|
|
|
|
import (
|
|
"github.com/ouxuanserver/osmanthuswine/src/core"
|
|
"time"
|
|
)
|
|
|
|
const LiveConfigAreaTN = TableNamePrefix + "live_config_area"
|
|
|
|
type LiveConfigArea struct {
|
|
Id int64 `json:"id" xorm:"not null pk autoincr INT(11)"`
|
|
IsDelete bool `json:"-" xorm:"not null default 0 comment('是否删除') TINYINT(1)"`
|
|
CreatedAt time.Time `json:"created_at" xorm:"not null created comment('创建时间') DATETIME"`
|
|
UpdatedAt time.Time `json:"updated_at" xorm:"not null updated default CURRENT_TIMESTAMP comment('更新时间') TIMESTAMP"`
|
|
ActivityId int64 `json:"activity_id" xorm:"not null default 0 comment('互动id') INT(11)"`
|
|
AreaId int64 `json:"area_id" xorm:"not null default 0 comment('地区id') INT(11)"`
|
|
LiveH5Url string `json:"live_h5_url" xorm:"not null default '' comment('h5直播地址') VARCHAR(255)"`
|
|
LiveH5Qrcode string `json:"live_h5_qrcode" xorm:"not null default '' comment('h5直播地址二维码') VARCHAR(255)"`
|
|
AdminLiveUrl string `json:"admin_live_url" xorm:"not null default '' comment('管理员直播地址,即直播页面中管理员登录页面') VARCHAR(255)"`
|
|
LiveH5AdminQrcode string `json:"live_h5_admin_qrcode" xorm:"not null default '' comment('管理员直播地址二维码') VARCHAR(255)"`
|
|
MergeSharePoster string `json:"merge_share_poster" xorm:"not null default '' comment('合成有二维码的海报') VARCHAR(255)"`
|
|
}
|
|
|
|
func (t *LiveConfigArea) TableName() string {
|
|
return LiveConfigAreaTN
|
|
}
|
|
|
|
func (t *LiveConfigArea) GetByActivityIdAndAreaId(activityId, areaId interface{}) (bool, error) {
|
|
return core.GetXormAuto().Where("is_delete=0 and activity_id=? and area_id=?", activityId, areaId).Get(t)
|
|
}
|