package Model /** * 大屏窗体信息类的描述 * @author miSter * @email hdfs010@163.com * @date no data * @link 北京飞利信电子技术有限公司 */ import ( "time" "github.com/spf13/viper" ) const ( TScreenform_Id = "id" //窗体id TScreenform_Sf_screenid = "sf_screenid" //大屏 系统窗体id TScreenform_Sf_typeid = "sf_typeid" //投屏窗体类型id TScreenform_Sf_name = "sf_name" //投屏窗体名称 TScreenform_Sf_describe = "sf_describe" //投屏窗体描述 TScreenform_Sf_content = "sf_content" //投屏窗体内容 TScreenform_Sf_width = "sf_width" //宽 TScreenform_Sf_bgcolor = "sf_bgcolor" //窗体的背景色 TScreenform_Sf_screenpath = "sf_screenpath" //窗体背景路径 TScreenform_Sf_height = "sf_height" //高 TScreenform_Sf_createtime = "sf_createtime" //创建时间 TScreenform_Sf_updatetime = "sf_updatetime" //修改时间 TScreenform_Sf_z = "sf_z" //缩放比 TScreenform_Sf_serial = "sf_serial" //排序 ) type TScreenform struct { Id string `gorm:"column:id;primary_key" json:"id"` //窗体id Sf_screenid string `gorm:"column:sf_screenid" json:"sf_screenid"` //大屏 系统窗体id Sf_typeid int64 `gorm:"column:sf_typeid" json:"sf_typeid"` //投屏窗体类型id 0大屏 1移动屏 Sf_name string `gorm:"column:sf_name" json:"sf_name"` //投屏窗体名称 Sf_describe string `gorm:"column:sf_describe" json:"sf_describe"` //投屏窗体描述 Sf_content string `gorm:"column:sf_content" json:"sf_content"` //投屏窗体内容 Sf_width int64 `gorm:"column:sf_width" json:"sf_width"` //宽 Sf_bgcolor string `gorm:"column:sf_bgcolor" json:"sf_bgcolor"` //窗体的背景色 Sf_screenpath string `gorm:"column:sf_screenpath" json:"sf_screenpath"` //窗体背景路径 Sf_height int64 `gorm:"column:sf_height" json:"sf_height"` //高 Sf_createtime time.Time `gorm:"column:sf_createtime" json:"sf_createtime"` //创建时间 Sf_updatetime time.Time `gorm:"column:sf_updatetime" json:"sf_updatetime"` //修改时间 Sf_z float64 `gorm:"column:sf_z" json:"sf_z"` //缩放比 Sf_serial int64 `gorm:"column:sf_serial" json:"sf_serial"` //排序 } func (TScreenform) TableName() string { tableName := "t_screenform" if viper.GetString("database.dbtype") == "kingbase" || viper.GetString("database.dbtype") == "postgres" { return viper.GetString("database.dbnames") + "." + tableName } return tableName }