273 lines
15 KiB
Go
273 lines
15 KiB
Go
// Code generated by gowebx, DO AVOID EDIT.
|
|
package vqd
|
|
|
|
import (
|
|
"database/sql/driver"
|
|
"encoding/json"
|
|
"git.lnton.com/lnton/pkg/orm"
|
|
)
|
|
|
|
type EncodeStatus int
|
|
|
|
const (
|
|
EncodeStatusEmpty EncodeStatus = iota
|
|
EncodeStatusSuccess
|
|
EncodeStatusPing
|
|
EncodeStatusFailed
|
|
)
|
|
|
|
type VqdTask struct {
|
|
orm.Model
|
|
Name string `gorm:"column:name;notNull;default:'';comment:名称" json:"name"` // 名称
|
|
ChannelID string `gorm:"column:channel_id;notNull;default:'';comment:关联通道" json:"channel_id"` // 关联通道
|
|
ChannelName string `gorm:"column:channel_name;notNull;default:'';comment:关联通道名称" json:"channel_name"` // 关联通道名称
|
|
TaskTemplateID int64 `gorm:"column:task_template_id;notNull;default:0;comment:关联模板" json:"task_template_id"` // 关联模板
|
|
TimeTemplateID int64 `gorm:"column:time_template_id;notNull;default:0;comment:关联计划" json:"time_template_id"` // 关联计划
|
|
Enable bool `gorm:"column:enable;notNull;default:FALSE;comment:启用" json:"enable"` // 启用
|
|
Des string `gorm:"column:des;notNull;default:'';comment:描述" json:"des"` // 描述
|
|
}
|
|
|
|
// TableName database table name
|
|
func (*VqdTask) TableName() string {
|
|
return "vqd_task"
|
|
}
|
|
|
|
type JsonField[T any] struct {
|
|
Val T
|
|
}
|
|
|
|
func (j JsonField[T]) Value() (driver.Value, error) {
|
|
return json.Marshal(j.Val)
|
|
}
|
|
|
|
func (j *JsonField[T]) Scan(input interface{}) error {
|
|
return orm.JsonUnmarshal(input, &j.Val)
|
|
}
|
|
|
|
type VqdConfig struct {
|
|
Enable bool `gorm:"column:enable;notNull;default:FALSE;comment:启用" json:"enable"` // 启用
|
|
FrmNum int32 `gorm:"column:frm_num;notNull;default:0;comment:过暗阈值" json:"frm_num"` // 连续分析帧数(2-64), 默认为10, 最大为 64
|
|
IsDeepLearn bool `gorm:"column:is_deep_learn;notNull;default:FALSE;comment:启用" json:"is_deep_learn"` // 是否使用深度学习版本, 默认使用深度学习版本
|
|
}
|
|
|
|
func (a VqdConfig) Value() (driver.Value, error) {
|
|
return json.Marshal(a)
|
|
}
|
|
func (i *VqdConfig) Scan(input interface{}) error {
|
|
return orm.JsonUnmarshal(input, i)
|
|
}
|
|
|
|
// 亮度检测
|
|
type VqdLgtDark struct {
|
|
Enable bool `gorm:"column:enable;notNull;default:FALSE;comment:启用" json:"enable"` // 启用
|
|
DarkThr float64 `gorm:"column:dark_thr;notNull;default:0;comment:过暗阈值" json:"dark_thr"` // 默认 0.4, 取值范围: 0~1, 建议范围: 0.2~0.6
|
|
LgtThr float64 `gorm:"column:lgt_thr;notNull;default:0;comment:过亮阈值" json:"lgt_thr"` // 默认 0.1, 取值范围: 0~1, 建议范围: 0.1~0.5
|
|
LgtDarkAbnNumRatio float64 `gorm:"column:lgt_dark_abn_num_ratio;notNull;default:0;comment:偏暗或者偏亮次数比例" json:"lgt_dark_abn_num_ratio"` // 默认为0.5, 取值范围: 0~1, 建议范围: 0.1~0.9
|
|
}
|
|
|
|
func (a VqdLgtDark) Value() (driver.Value, error) {
|
|
return json.Marshal(a)
|
|
}
|
|
func (i *VqdLgtDark) Scan(input interface{}) error {
|
|
return orm.JsonUnmarshal(input, i)
|
|
}
|
|
|
|
// 蓝屏检查
|
|
type VqdBlue struct {
|
|
Enable bool `gorm:"column:enable;notNull;default:FALSE;comment:启用" json:"enable"` // 启用
|
|
BlueThr float64 `gorm:"column:blue_thr;notNull;default:0;comment:蓝屏判断阈值" json:"blue_thr"` // 默认为 0.6, 取值范围: 0~1, 建议范围 0.4~0.9
|
|
BlueAbnNumRatio float64 `gorm:"column:blue_abn_num_ratio;notNull;default:0;comment:蓝屏次数比例" json:"blue_abn_num_ratio"` // 默认为0.5, 取值范围: 0~1, 建议范围: 0.1~0.9
|
|
}
|
|
|
|
func (a VqdBlue) Value() (driver.Value, error) {
|
|
return json.Marshal(a)
|
|
}
|
|
func (i *VqdBlue) Scan(input interface{}) error {
|
|
return orm.JsonUnmarshal(input, i)
|
|
}
|
|
|
|
// 清晰度检查
|
|
type VqdClarity struct {
|
|
Enable bool `gorm:"column:enable;notNull;default:FALSE;comment:启用" json:"enable"` // 启用
|
|
ClarityThr float64 `gorm:"column:clarity_thr;notNull;default:0;comment:清晰度判断阈值" json:"clarity_thr"` // 默认为0.4, 取值范围: 0~1, 建议范围: 0.3~0.99
|
|
ClarityAbnNumRatio float64 `gorm:"column:clarity_abn_num_ratio;notNull;default:0;comment:清晰度异常次数比例" json:"clarity_abn_num_ratio"` // 默认为0.5, 取值范围: 0~1, 建议范围: 0.1~0.9
|
|
}
|
|
|
|
func (a VqdClarity) Value() (driver.Value, error) {
|
|
return json.Marshal(a)
|
|
}
|
|
func (i *VqdClarity) Scan(input interface{}) error {
|
|
return orm.JsonUnmarshal(input, i)
|
|
}
|
|
|
|
// 抖动检查
|
|
type VqdShark struct {
|
|
Enable bool `gorm:"column:enable;notNull;default:FALSE;comment:启用" json:"enable"` // 启用
|
|
SharkThr float64 `gorm:"column:shark_thr;notNull;default:0;comment:抖动阈值参数" json:"shark_thr"` // 默认为 0.2, 取值范围: 0~1, 建议范围: 0.1~0.8
|
|
SharkAbnNumRatio float64 `gorm:"column:shark_abn_num_ratio;notNull;default:0;comment:出现抖动次数的比例" json:"shark_abn_num_ratio"` // 默认为0.2, 取值范围: 0~1, 建议范围: 0.1~0.6
|
|
}
|
|
|
|
func (a VqdShark) Value() (driver.Value, error) {
|
|
return json.Marshal(a)
|
|
}
|
|
func (i *VqdShark) Scan(input interface{}) error {
|
|
return orm.JsonUnmarshal(input, i)
|
|
}
|
|
|
|
// 冻结检测
|
|
type VqdFreeze struct {
|
|
Enable bool `gorm:"column:enable;notNull;default:FALSE;comment:启用" json:"enable"` // 启用
|
|
FreezeThr float64 `gorm:"column:freeze_thr;notNull;default:0;comment:冻结阈值参数" json:"freeze_thr"` // 默认 0.4, 取值范围: 0~1, 建议范围: 0.2~0.6
|
|
FreezeAbnNumRatio float64 `gorm:"column:freeze_abn_num_ratio;notNull;default:0;comment:冻结帧数占得比例" json:"freeze_abn_num_ratio"` // 默认为0.99, 取值范围: 0.8~1, 建议范围: 0.95~1
|
|
}
|
|
|
|
func (a VqdFreeze) Value() (driver.Value, error) {
|
|
return json.Marshal(a)
|
|
}
|
|
func (i *VqdFreeze) Scan(input interface{}) error {
|
|
return orm.JsonUnmarshal(input, i)
|
|
}
|
|
|
|
// 偏色检测
|
|
type VqdColor struct {
|
|
Enable bool `gorm:"column:enable;notNull;default:FALSE;comment:启用" json:"enable"` // 启用
|
|
ColorThr float64 `gorm:"column:color_thr;notNull;default:0;comment:偏色判断值" json:"color_thr"` // 默认为0.18, 取值范围: 0~1, 建议范围: 0.1~0.5
|
|
ColorAbnNumRatio float64 `gorm:"column:color_abn_num_ratio;notNull;default:0;comment:偏色次数比例" json:"color_abn_num_ratio"` // 默认为0.5, 取值范围: 0~1, 建议范围: 0.3~0.9
|
|
}
|
|
|
|
func (a VqdColor) Value() (driver.Value, error) {
|
|
return json.Marshal(a)
|
|
}
|
|
func (i *VqdColor) Scan(input interface{}) error {
|
|
return orm.JsonUnmarshal(input, i)
|
|
}
|
|
|
|
// 遮挡检测
|
|
type VqdOcclusion struct {
|
|
Enable bool `gorm:"column:enable;notNull;default:FALSE;comment:启用" json:"enable"` // 启用
|
|
OcclusionThr float64 `gorm:"column:occlusion_thr;notNull;default:0;comment:遮挡判断阈值" json:"occlusion_thr"` // 默认为0.1, 取值范围: 0~1, 建议范围: 0.05~0.5
|
|
OcclusionAbnNumRatio float64 `gorm:"column:occlusion_abn_num_ratio;notNull;default:0;comment:遮挡次数比例" json:"occlusion_abn_num_ratio"` // 默认为0.5, 取值范围: 0~1, 建议范围: 0.3~0.9
|
|
}
|
|
|
|
func (a VqdOcclusion) Value() (driver.Value, error) {
|
|
return json.Marshal(a)
|
|
}
|
|
func (i *VqdOcclusion) Scan(input interface{}) error {
|
|
return orm.JsonUnmarshal(input, i)
|
|
}
|
|
|
|
// 噪声检测
|
|
type VqdNoise struct {
|
|
Enable bool `gorm:"column:enable;notNull;default:FALSE;comment:启用" json:"enable"` // 启用
|
|
NoiseThr float64 `gorm:"column:noise_thr;notNull;default:0;comment:噪声判断阈值" json:"noise_thr"` // 默认为 0.3, 取值范围: 0~1, 建议范围: 0.2~0.8
|
|
NoiseAbnNumRatio float64 `gorm:"column:noise_abn_num_ratio;notNull;default:0;comment:噪声次数比例" json:"noise_abn_num_ratio"` // 默认为0.6, 取值范围: 0~1, 建议范围: 0.3~0.9
|
|
}
|
|
|
|
func (a VqdNoise) Value() (driver.Value, error) {
|
|
return json.Marshal(a)
|
|
}
|
|
func (i *VqdNoise) Scan(input interface{}) error {
|
|
return orm.JsonUnmarshal(input, i)
|
|
}
|
|
|
|
// 对比度检测
|
|
type VqdContrast struct {
|
|
Enable bool `gorm:"column:enable;notNull;default:FALSE;comment:启用" json:"enable"` // 启用
|
|
CtraLowThr float64 `gorm:"column:ctra_low_thr;notNull;default:0;comment:低对比度判断阈值" json:"ctra_low_thr"` // 默认为 0.2, 取值范围: 0~1, 建议范围: 0.1~0.3
|
|
CtraHighThr float64 `gorm:"column:ctra_high_thr;notNull;default:0;comment:高对比度判断阈值" json:"ctra_high_thr"` // 默认为 0.8, 取值范围: 0~1, 建议范围: 0.7~0.9
|
|
CtraAbnNumRatio float64 `gorm:"column:ctra_abn_num_ratio;notNull;default:0;comment:对比度异常次数比例" json:"ctra_abn_num_ratio"` // 默认为0.5, 取值范围: 0~1, 建议范围: 0.3~0.9
|
|
}
|
|
|
|
func (a VqdContrast) Value() (driver.Value, error) {
|
|
return json.Marshal(a)
|
|
}
|
|
func (i *VqdContrast) Scan(input interface{}) error {
|
|
return orm.JsonUnmarshal(input, i)
|
|
}
|
|
|
|
// 马赛克检测
|
|
type VqdMosaic struct {
|
|
Enable bool `gorm:"column:enable;notNull;default:FALSE;comment:启用" json:"enable"` // 启用
|
|
MosaicThr float64 `gorm:"column:mosaic_thr;notNull;default:0;comment:马赛克阈值参数" json:"mosaic_thr"` // 默认为 0.1 取值范围: 0~1, 建议范围: 0.1~0.9
|
|
MosaicAbnNumRatio float64 `gorm:"column:mosaic_abn_num_ratio;notNull;default:0;comment:马赛克次数比例" json:"mosaic_abn_num_ratio"` // 默认为0.5,取值范围: 0~1, 建议范围: 0.3
|
|
}
|
|
|
|
func (a VqdMosaic) Value() (driver.Value, error) {
|
|
return json.Marshal(a)
|
|
}
|
|
func (i *VqdMosaic) Scan(input interface{}) error {
|
|
return orm.JsonUnmarshal(input, i)
|
|
}
|
|
|
|
// 花屏检测
|
|
type VqdFlower struct {
|
|
Enable bool `gorm:"column:enable;notNull;default:FALSE;comment:启用" json:"enable"` // 启用
|
|
FlowerThr float64 `gorm:"column:flower_thr;notNull;default:0;comment:花屏阈值参数" json:"flower_thr"` // 默认为 0.3 取值范围: 0~1, 建议范围: 0.1~0.9
|
|
FlowerAbnNumRatio float64 `gorm:"column:flower_abn_num_ratio;notNull;default:0;comment:花屏次数比例" json:"flower_abn_num_ratio"` // 默认为0.6, 取值范围: 0~1, 建议范围: 0.3
|
|
MosaicThr float64 `gorm:"column:mosaic_thr;notNull;default:0;comment:阈值" json:"mosaic_thr"` // 默认为 0.3 取值范围: 0~1, 建议范围: 0.1~0.9
|
|
}
|
|
|
|
func (a VqdFlower) Value() (driver.Value, error) {
|
|
return json.Marshal(a)
|
|
}
|
|
func (i *VqdFlower) Scan(input interface{}) error {
|
|
return orm.JsonUnmarshal(input, i)
|
|
}
|
|
|
|
type VqdTaskTemplate struct {
|
|
orm.Model
|
|
Name string `gorm:"column:name;notNull;default:'';comment:名称" json:"name"`
|
|
IsDefault bool `gorm:"column:is_default;notNull;default:FALSE;comment:是否默认" json:"is_default"`
|
|
VqdConfig VqdConfig `gorm:"column:vqd_config;type:jsonb;notNull;default:'{}';comment:诊断基础配置" json:"vqd_config"` // 诊断基础配置
|
|
VqdLgtDark VqdLgtDark `gorm:"column:vqd_lgt_dark;type:jsonb;notNull;default:'{}';comment:亮度检测" json:"vqd_lgt_dark"` // 亮度检测
|
|
VqdBlue VqdBlue `gorm:"column:vqd_blue;type:jsonb;notNull;default:'{}';comment:蓝屏检查" json:"vqd_blue"` // 蓝屏检查
|
|
VqdClarity VqdClarity `gorm:"column:vqd_clarity;type:jsonb;notNull;default:'{}';comment:清晰度检查" json:"vqd_clarity"` // 清晰度检查
|
|
VqdShark VqdShark `gorm:"column:vqd_shark;type:jsonb;notNull;default:'{}';comment:抖动检查" json:"vqd_shark"` // 抖动检查
|
|
VqdFreeze VqdFreeze `gorm:"column:vqd_freeze;type:jsonb;notNull;default:'{}';comment:冻结检测" json:"vqd_freeze"` // 冻结检测
|
|
VqdColor VqdColor `gorm:"column:vqd_color;type:jsonb;notNull;default:'{}';comment:偏色检测" json:"vqd_color"` // 偏色检测
|
|
VqdOcclusion VqdOcclusion `gorm:"column:vqd_occlusion;type:jsonb;notNull;default:'{}';comment:遮挡检测" json:"vqd_occlusion"` // 遮挡检测
|
|
VqdNoise VqdNoise `gorm:"column:vqd_noise;type:jsonb;notNull;default:'{}';comment:噪声检测" json:"vqd_noise"` // 噪声检测
|
|
VqdContrast VqdContrast `gorm:"column:vqd_contrast;type:jsonb;notNull;default:'{}';comment:对比度检测" json:"vqd_contrast"` // 对比度检测
|
|
VqdMosaic VqdMosaic `gorm:"column:vqd_mosaic;type:jsonb;notNull;default:'{}';comment:马赛克检测" json:"vqd_mosaic"` // 马赛克检测
|
|
VqdFlower VqdFlower `gorm:"column:vqd_flower;type:jsonb;notNull;default:'{}';comment:花屏检测" json:"vqd_flower"` // 花屏检测
|
|
Des string `gorm:"column:des;notNull;default:'';comment:描述" json:"des"` // 描述
|
|
}
|
|
|
|
// TableName database table name
|
|
func (*VqdTaskTemplate) TableName() string {
|
|
return "vqd_task_template"
|
|
}
|
|
|
|
type VqdTimeTemplate struct {
|
|
orm.Model
|
|
Name string `gorm:"column:name;notNull;default:'';comment:名称" json:"name"`
|
|
Plans string `gorm:"column:plans;notNull;default:'';comment:计划" json:"plans"`
|
|
Enable bool `gorm:"column:enable;notNull;default:TRUE;comment:是否启用" json:"enable"`
|
|
IsDefault bool `gorm:"column:is_default;notNull;default:FALSE;comment:是否默认" json:"is_default"`
|
|
Des string `gorm:"column:des;notNull;default:'';comment:描述" json:"des"` // 描述
|
|
}
|
|
|
|
// TableName database table name
|
|
func (*VqdTimeTemplate) TableName() string {
|
|
return "vqd_time_template"
|
|
}
|
|
|
|
type VqdAlarm struct {
|
|
orm.Model
|
|
AlarmName string `gorm:"column:alarm_name;notNull;default:'';comment:告警名称" json:"alarm_name"` // 告警名称
|
|
AlarmValue string `gorm:"column:alarm_value;notNull;default:'';comment:告警参数" json:"alarm_value"` // 告警参数
|
|
ChannelID string `gorm:"column:channel_id;notNull;default:'';comment:关联通道" json:"channel_id"` // 关联通道
|
|
ChannelName string `gorm:"column:channel_name;notNull;default:'';comment:关联通道名称" json:"channel_name"` // 关联通道名称
|
|
TaskTemplateID int64 `gorm:"column:task_template_id;notNull;default:0;comment:关联模板" json:"task_template_id"` //关联模板
|
|
TaskTemplateName string `gorm:"column:task_template_name;notNull;default:0;comment:关联模板名称" json:"task_template_name"` //关联模板名称
|
|
TaskID int64 `gorm:"column:task_id;notNull;default:0;comment:关联任务" json:"task_id"` // 关联任务名称
|
|
TaskName string `gorm:"column:task_name;notNull;default:'';comment:关联任务名称" json:"task_name"` // 任务名称
|
|
FilePath string `gorm:"column:file_path;notNull;default:'';comment:文件路径" json:"file_path"` // 文件路径
|
|
|
|
}
|
|
|
|
// TableName database table name
|
|
func (*VqdAlarm) TableName() string {
|
|
return "vqd_alarm"
|
|
}
|