You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
2.6 KiB
Go
61 lines
2.6 KiB
Go
package Model
|
|
|
|
/**
|
|
|
|
* 屏幕信息类的描述
|
|
|
|
* @author miSter
|
|
|
|
* @email hdfs010@163.com
|
|
|
|
* @date no data
|
|
|
|
* @link <a href=http://www.philisense.com>北京飞利信电子技术有限公司</a>
|
|
|
|
*/
|
|
import (
|
|
"time"
|
|
|
|
"github.com/spf13/viper"
|
|
)
|
|
|
|
const (
|
|
TScreen_Id = "id" //屏幕id
|
|
TScreen_Scr_sortid = "scr_sortid" //屏幕分类id 和屏幕窗体分类相同
|
|
TScreen_Scr_name = "scr_name" //屏幕名称
|
|
TScreen_Scr_describe = "scr_describe" //屏幕描述
|
|
TScreen_Scr_width = "scr_width" //屏幕宽
|
|
TScreen_Scr_height = "scr_height" //屏幕高
|
|
TScreen_Scr_xpoint = "scr_xpoint" //屏幕x坐标
|
|
TScreen_Scr_ypoint = "scr_ypoint" //屏幕y坐标
|
|
TScreen_Scr_isenabled = "scr_isenabled" //是否显示 0不显示 1显示
|
|
TScreen_Scr_serial = "scr_serial" //排序编号
|
|
TScreen_Scr_createtime = "scr_createtime" //创建时间
|
|
TScreen_Scr_updatetime = "scr_updatetime" //修改时间
|
|
TScreen_Scr_bgcolor = "scr_bgcolor" //scr_bgcolor
|
|
)
|
|
|
|
type TScreen struct {
|
|
Id string `gorm:"column:id;primary_key" json:"id"` //屏幕id
|
|
Scr_sortid int64 `gorm:"column:scr_sortid" json:"scr_sortid"` //屏幕分类id 和屏幕窗体分类相同(1111大屏 2222委员屏 3333列席屏 4444主持人 5555报到门)
|
|
Scr_name string `gorm:"column:scr_name" json:"scr_name"` //屏幕名称
|
|
Scr_describe string `gorm:"column:scr_describe" json:"scr_describe"` //屏幕描述
|
|
Scr_width int64 `gorm:"column:scr_width" json:"scr_width"` //屏幕宽
|
|
Scr_height int64 `gorm:"column:scr_height" json:"scr_height"` //屏幕高
|
|
Scr_xpoint int64 `gorm:"column:scr_xpoint" json:"scr_xpoint"` //屏幕x坐标
|
|
Scr_ypoint int64 `gorm:"column:scr_ypoint" json:"scr_ypoint"` //屏幕y坐标
|
|
Scr_isenabled int64 `gorm:"column:scr_isenabled" json:"scr_isenabled"` //是否显示 0不显示 1显示
|
|
Scr_serial int64 `gorm:"column:scr_serial" json:"scr_serial"` //排序编号
|
|
Scr_createtime time.Time `gorm:"column:scr_createtime" json:"scr_createtime"` //创建时间
|
|
Scr_updatetime time.Time `gorm:"column:scr_updatetime" json:"scr_updatetime"` //修改时间
|
|
Scr_bgcolor string `gorm:"column:scr_bgcolor" json:"scr_bgcolor"` //scr_bgcolor
|
|
}
|
|
|
|
func (TScreen) TableName() string {
|
|
tableName := "t_screen"
|
|
if viper.GetString("database.dbtype") == "kingbase" || viper.GetString("database.dbtype") == "postgres" {
|
|
return viper.GetString("database.dbnames") + "." + tableName
|
|
}
|
|
return tableName
|
|
}
|