| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433 |
- package models
- import (
- "github.com/astaxie/beego/orm"
- )
- type Alarm_event struct {
- Id int `orm:"pk;auto"` // int// NOT NULL AUTO_INCREMENT COMMENT '告警事件表',
- Eventid int64 // int64//(20) NOT NULL COMMENT '事件ID,全局唯一',
- Subeventid int64 //int64//(20) DEFAULT NULL COMMENT '测点告警时,对应的复归事件ID',
- Eventdesc string //string // COMMENT '告警事件描述',
- Eventtype int //int// DEFAULT NULL COMMENT '事件类别。1-测点告警,2-系统告警,3-告警复归',
- Timestamp int64 //int64//(20) DEFAULT NULL COMMENT '事件产生时的时间戳',
- Strategyid int64 //int64//(20) DEFAULT NULL COMMENT '关联的告警策略ID,只用于测点告警',
- Confirm int // int// DEFAULT '1' COMMENT '用户是否确认。1-未确认,2-已确认',
- Confirmtime string // string // DEFAULT NULL COMMENT '用户确认时间',
- Result string //string // COMMENT '用户处理结果',
- Appid int //int// DEFAULT NULL,
- Alarmlevel int // int// DEFAULT NULL COMMENT '告警级别,1 预警,2 一般,3 严重,4 危急',
- CreateAt string //string // DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- UpdateAt string //string // DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- }
- type Alarm_relation struct {
- Id int `orm:"pk;auto"` //int// NOT NULL AUTO_INCREMENT COMMENT '告警策略表',
- Strategyid int64 //(20) DEFAULT NULL COMMENT '策略ID。全局唯一',
- Mpid int64 //(20) DEFAULT NULL COMMENT '测点ID。全局唯一',
- Alarmtype int //int// DEFAULT NULL COMMENT '测点告警类型。1-阈值告警,2-开关量告警,3-差值告警,4-视频告警,5-测点离线告警',
- Uplimit float64 //(16,6) DEFAULT NULL COMMENT '阈值上限',
- Dnlimit float64 //(16,6) DEFAULT NULL COMMENT '阈值下限',
- Dio int //int// DEFAULT NULL COMMENT '开关量(0、1),或者视频告警类型。',
- Diffvalue float64 //(16,6) DEFAULT NULL COMMENT '差值',
- Relation int //int// DEFAULT NULL COMMENT '多测点间告警关系。1-与,2-或,3-无',
- CreateAt string // DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- UpdateAt string // DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间'
- }
- type Alarm_strategy struct {
- Id int `orm:"pk;auto"` //int// NOT NULL AUTO_INCREMENT COMMENT '告警策略表',
- Strategyid int64 //(20) NOT NULL COMMENT '策略ID,全局唯一',
- Appid int //int// DEFAULT NULL COMMENT '所属APP id',
- Strategyname string //(255) DEFAULT NULL COMMENT '策略名称,告警策略描述',
- Alarmlevel int //int// DEFAULT NULL COMMENT '告警级别,1 预警,2 一般,3 严重,4 危急',
- Disable int //int// DEFAULT '1' COMMENT '策略停用标志。1-启用 2-停用, 默认启用',
- CreateAt string // DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- UpdateAt string // DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间'
- }
- type Dev_cpaction struct {
- Id int `orm:"pk;auto"` //int// NOT NULL AUTO_INCREMENT COMMENT '控制点动作表',
- Actid int64 //(20) DEFAULT NULL COMMENT '动作ID,全局唯一',
- Cpid int64 //(20) DEFAULT NULL COMMENT '所属控制点ID,全局唯一',
- Acttype int //int// DEFAULT NULL COMMENT '动作分类。开关量动作-1, 模拟量动作-2',
- Actdesc string //(255) DEFAULT NULL COMMENT '动作描述',
- Value float64 //(16,6) DEFAULT NULL COMMENT '动作取值',
- Delay int //int// DEFAULT NULL COMMENT '动作执行时对外部命令的封闭时间(不响应外部指令),单位秒',
- Successval float64 //(16,6) DEFAULT NULL COMMENT '录入的控制成功的状态值',
- CreateAt string // DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- UpdateAt string // DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间'
- }
- type Dev_cpinfo struct {
- Id int `orm:"pk;auto"` //int// NOT NULL AUTO_INCREMENT COMMENT '控制点信息表',
- Cpid int64 //(20) DEFAULT NULL COMMENT '控制点ID,全局唯一',
- Cpname string //(255) DEFAULT NULL COMMENT '控制点名称',
- Zonename string //(255) DEFAULT NULL COMMENT '所在区域名称',
- Positionname string //(255) DEFAULT NULL COMMENT '区域内位置',
- Appid int // DEFAULT NULL COMMENT '所属APP id',
- Modelid int // DEFAULT NULL COMMENT '所属模型id',
- Deviceid int // DEFAULT NULL COMMENT '所属设备id ',
- Attrname string //(255) DEFAULT NULL COMMENT '对应模型属性',
- Mpid int64 //(20) DEFAULT NULL COMMENT '关联的测点id,关联控制点影响的设备状态(状态作为一个测点存在,如无可忽略),全局唯一',
- CreateAt string // DEFAULT CURRENT_TIMESTAMP,
- UpdateAt string // DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
- }
- type Dev_data_optimize struct {
- Id int `orm:"pk;auto"` // NOT NULL AUTO_INCREMENT COMMENT '数据优化表',
- Mpid int64 //(20) DEFAULT NULL COMMENT '测点ID',
- Algoid int // DEFAULT NULL COMMENT '算法ID',
- Refid int64 //(20) DEFAULT NULL COMMENT '算法参考测点ID',
- CreateAt string // DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- UpdateAt string // DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间'
- }
- type Dev_devinfo struct {
- Id int `orm:"pk;auto"` // NOT NULL AUTO_INCREMENT COMMENT '设备信息表',
- Stationid int // DEFAULT NULL COMMENT '所属变电站ID',
- Deviceid int // DEFAULT NULL COMMENT '设备ID,查询变电框架返回',
- Devicename string //(255) DEFAULT NULL COMMENT '设备名称',
- Appid int // DEFAULT NULL COMMENT '所属APP ID',
- Modelid int // DEFAULT NULL COMMENT '所属模型ID',
- Protocol string //(255) DEFAULT NULL COMMENT '采集协议',
- Serial string //(255) DEFAULT NULL COMMENT '串口地址',
- Baudrate int // DEFAULT NULL COMMENT '串口波特率',
- Stopbit int // DEFAULT NULL COMMENT '串口停止位',
- Checkbit string //(2) DEFAULT NULL COMMENT '串口检测位',
- Databit int // DEFAULT NULL COMMENT '串口数据位',
- Slaveid int // DEFAULT NULL COMMENT '从设备ID',
- Ip string //(64) DEFAULT NULL COMMENT 'IP地址',
- Port int // DEFAULT NULL COMMENT '端口号(modbus tcp)',
- Eid string //(255) DEFAULT NULL COMMENT '微功耗传感器ID',
- Mqtttopic string //(255) DEFAULT NULL COMMENT 'mqtt采集协议时对应的主题',
- Disable int // DEFAULT '1' COMMENT '设备禁用标志。1未禁用 2禁用',
- Online int // DEFAULT '2' COMMENT '设备在线状态。1离线 2在线 3超时,持续超时次数5次则离线',
- CreateAt string // DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- UpdateAt string // DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间'
- }
- type Dev_mpinfo struct {
- Id int `orm:"pk;auto"` // unsigned zerofill NOT NULL AUTO_INCREMENT COMMENT '测点信息表',
- Mpid int64 //(20) DEFAULT NULL COMMENT '测点ID,全局唯一索引',
- Mpname string //(255) DEFAULT NULL COMMENT '测点名称',
- Zonename string //(255) DEFAULT NULL COMMENT '所在区域名称',
- Positionname string //(255) DEFAULT NULL COMMENT '区域内位置',
- Appid int // DEFAULT NULL COMMENT '所属APP id',
- Modelid int // DEFAULT NULL COMMENT '所属模型id',
- Deviceid int // DEFAULT NULL COMMENT '所属设备id ',
- Attrname string //(255) DEFAULT NULL COMMENT '对应模型属性',
- Unit string //(255) DEFAULT NULL COMMENT '测点单位',
- Online int // DEFAULT '1' COMMENT '1离线/2 在线 / 3 超时。持续超时次数5次则离线',
- Disable int // DEFAULT '1' COMMENT '测点停用标志。1-启用 2-停用, 默认启用',
- CreateAt string // DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- UpdateAt string // DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间'
- }
- type Dev_task struct {
- Id int `orm:"pk;auto"` // NOT NULL AUTO_INCREMENT COMMENT '设备计划任务表',
- Taskid int64 //(20) DEFAULT NULL COMMENT '计划任务ID。全局唯一',
- Appid int // DEFAULT NULL COMMENT '所属APP ID',
- Taskdesc string //(255) DEFAULT NULL COMMENT '计划任务描述',
- Tasktype int // DEFAULT NULL COMMENT '任务分类。1-普通任务 2-循环任务',
- Starttime string // DEFAULT NULL COMMENT '任务开始时间',
- Runtime int // DEFAULT NULL COMMENT '任务执行时间。单位秒',
- Period int // DEFAULT NULL COMMENT '循环间隔时间。只适用于循环任务(普通任务固定为0),代表任务循环执行的周期,单位秒',
- Actid int64 //(20) DEFAULT NULL COMMENT '动作ID',
- Status int // DEFAULT NULL COMMENT '任务执行状态。1-执行中 2-执行结束 3-计时中 4-暂停',
- Pause int // DEFAULT '1' COMMENT '任务暂停控制。1-不暂停 2-暂停',
- CreateAt string // DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- UpdateAt string // DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
- }
- type Dev_task_action struct {
- Id int `orm:"pk;auto"` // NOT NULL AUTO_INCREMENT COMMENT '联动动作关联表',
- Taskid int64 //(20) DEFAULT NULL COMMENT '任务ID。',
- Dstid int64 //(20) DEFAULT NULL COMMENT '目标ID。动作id或者视频测点id',
- Actindex int // DEFAULT NULL COMMENT '动作序列号。动作顺序执行的编号',
- Actid int64 //(20) DEFAULT NULL COMMENT '目标动作ID。',
- Delay int // DEFAULT NULL COMMENT '动作执行后的延迟等待时间,秒',
- CreateAt string // DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- UpdateAt string // DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间'
- }
- type Dev_task_event struct {
- Id int `orm:"pk;auto"` // NOT NULL AUTO_INCREMENT COMMENT '计划任务事件表',
- Eventid int64 //(20) DEFAULT NULL COMMENT '事件ID。全局唯一',
- Execid int64 //(20) DEFAULT NULL COMMENT '任务执行ID。',
- Taskid int64 //(20) DEFAULT NULL COMMENT '任务ID。全局唯一',
- Starttime string // DEFAULT NULL COMMENT '开始任务时间',
- Endtime string // DEFAULT NULL COMMENT '结束任务时间',
- Status int // DEFAULT NULL COMMENT '任务的状态。1-执行中 2-执行结束',
- Balarm int // DEFAULT NULL COMMENT '任务过程中是否告警。1-不告警 2-告警',
- Alarmlevel int // DEFAULT NULL COMMENT '告警级别,1 预警,2 一般,3 严重,4 危急',
- Alarmeventid int64 //(20) DEFAULT NULL COMMENT '关联的告警事件id',
- Result string // COMMENT '动作执行结果。动作描述+执行结果',
- CreateAt string // DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- UpdateAt string // DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间'
- }
- type Dev_task_exec struct {
- Id int `orm:"pk;auto"` // NOT NULL AUTO_INCREMENT COMMENT '计划任务执行记录总览表',
- Execid int64 //(20) DEFAULT NULL COMMENT '任务执行ID。全局唯一',
- Taskid int64 //(20) DEFAULT NULL COMMENT '任务ID。全局唯一',
- Starttime string // DEFAULT NULL COMMENT '开始任务时间',
- Endtime string // DEFAULT NULL COMMENT '结束任务时间',
- Status int // DEFAULT NULL COMMENT '任务的状态。1-执行中 2-执行结束 3-中断',
- Balarm int // DEFAULT NULL COMMENT '任务过程中是否告警。1-不告警 2-告警',
- Alarmlevel int // DEFAULT NULL COMMENT '告警级别,1 预警,2 一般,3 严重,4 危急',
- Result string // COMMENT '动作执行结果。',
- CreateAt string // DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- UpdateAt string // DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间'
- }
- type Link_event struct {
- Id int `orm:"pk;auto"` // NOT NULL AUTO_INCREMENT COMMENT '联动事件表',
- Eventid int64 //(20) DEFAULT NULL COMMENT '联动事件ID,全局唯一',
- Eventdesc string // COMMENT '联动事件描述',
- Timestamp int64 //(20) DEFAULT NULL COMMENT '事件产生时的时间戳',
- Strategyid int64 //(20) DEFAULT NULL COMMENT '关联的联动策略ID',
- Linktoid int64 //(20) DEFAULT NULL COMMENT '联动目标ID',
- Beforestatus string // COMMENT '联动前目标状态。变电采集设备状态为控制点关联的测点数据。视频设备状态为预置位名称',
- Afterstatus string // COMMENT '联动后目标状态',
- Result string // COMMENT '执行结果',
- Srcappid int // DEFAULT NULL COMMENT '来源app id',
- Dstappid int // DEFAULT NULL COMMENT '目标app id',
- CreateAt string // DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- UpdateAt string // DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间'
- }
- type Link_relation_action struct {
- Id int `orm:"pk;auto"` // NOT NULL AUTO_INCREMENT COMMENT '联动动作关联表',
- Strategyid int64 //(20) DEFAULT NULL COMMENT '联动策略ID。全局唯一',
- Linktoid int64 //(20) DEFAULT NULL COMMENT '联动目标ID。动作id或者视频测点id',
- Actindex int // DEFAULT NULL COMMENT '动作序列号。动作顺序执行的编号',
- Actid int64 //(20) DEFAULT NULL COMMENT '目标动作ID或者视频动作点ID。',
- Delay int // DEFAULT NULL COMMENT '动作执行后的延迟等待时间,秒',
- CreateAt string // DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- UpdateAt string // DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间'
- }
- type Link_relation_obj struct {
- Id int `orm:"pk;auto"` // NOT NULL AUTO_INCREMENT COMMENT '联动目标关联表',
- Strategyid int64 //(20) DEFAULT NULL COMMENT '联动策略ID',
- Linkfromid int64 //(20) DEFAULT NULL COMMENT '联动来源ID',
- Value string //(512) DEFAULT NULL COMMENT '来源ID对应的联动触发取值(对应测点联动类型)',
- Than int // DEFAULT NULL COMMENT '1-大于 2-等于 3-小于 4-大于等于 5-小于等于',
- Relation int // DEFAULT NULL COMMENT '1-与 2-或 3-差 4-无',
- CreateAt string // DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- UpdateAt string // DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间'
- }
- type Link_strategy struct {
- Id int `orm:"pk;auto"` // NOT NULL AUTO_INCREMENT COMMENT '联动策略表',
- Strategyid int64 //(20) DEFAULT NULL COMMENT '联动策略ID,全局唯一',
- Appid int // DEFAULT NULL COMMENT '所属APP id',
- Strategyname string //(255) DEFAULT NULL COMMENT '联动策略名称',
- Linktype int // DEFAULT NULL COMMENT '联动类型。1测点联动 2模拟IO量输入事件联动 3数字量IO量输入联动 4 模拟IO量输出事件联动 5 数字量IO量输出联动 6 辅控事件联动',
- Disable int // DEFAULT '1' COMMENT '策略停用标志。1-启用 2-停用, 默认启用',
- Donum int // DEFAULT '1' COMMENT '联动动作次数。0为一直动作',
- Donenum int // DEFAULT '0' COMMENT '联动动作次数。0为复归',
- CreateAt string // DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- UpdateAt string // DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间'
- }
- type Map_info struct {
- Id int `orm:"pk;auto"` // NOT NULL AUTO_INCREMENT,
- Stageid string //(32) DEFAULT NULL COMMENT '场景id',
- Index int // DEFAULT NULL COMMENT '是否首页 0-不是 1-是',
- Maptype int // DEFAULT NULL COMMENT '地图类型 1:网络拓扑图 2:三维图',
- Stationid int64 //(20) DEFAULT NULL COMMENT '变电站id',
- Appid int64 //(20) DEFAULT NULL COMMENT '地图所属app id',
- CreateAt string // DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- UpdateAt string // DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间'
- }
- type Sys_app struct {
- Id int `orm:"pk;auto"` // NOT NULL AUTO_INCREMENT,
- Appid int // DEFAULT NULL COMMENT 'app id',
- Nickname string //(255) DEFAULT NULL COMMENT 'app别称',
- Appname string //(255) DEFAULT NULL COMMENT 'app名称标识',
- Path string //(255) DEFAULT NULL COMMENT 'app安装路径',
- Url string //(255) DEFAULT NULL COMMENT 'app url地址',
- Version string //(32) DEFAULT NULL COMMENT 'app版本号',
- Icon string // COMMENT 'App图标',
- CreateAt string // DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- UpdateAt string // DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间'
- }
- type Video_action struct {
- Id int // NOT NULL AUTO_INCREMENT COMMENT '视频设备动作表',
- Actid int64 //(20) DEFAULT NULL COMMENT '动作ID。全局唯一',
- Mpid int64 //(20) DEFAULT NULL COMMENT '测点ID。全局唯一',
- Acttype int // DEFAULT NULL COMMENT '动作分类。录像-1,拍照-2,录像并拍照-3,4-无 ',
- Capnum int // DEFAULT NULL COMMENT '快照次数',
- Rectime int // DEFAULT NULL COMMENT '录像时长 。单位秒',
- Actdesc string //(255) DEFAULT NULL COMMENT '动作描述',
- CreateAt string // DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- UpdateAt string // DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间'
- }
- type Video_devinfo struct {
- Id int `orm:"pk;auto"` // NOT NULL AUTO_INCREMENT COMMENT '视频设备信息表',
- DeviceId int64 //(20) DEFAULT NULL COMMENT '设备ID。视频采集框架返回',
- Channel int // DEFAULT NULL COMMENT '通道号。视频采集框架返回',
- DeviceIp string //(255) DEFAULT NULL COMMENT '设备ip',
- DeviceCode string //(255) DEFAULT NULL COMMENT '设备编码。nvr/ipc, 表示是网络摄像机或者是网络摄像头',
- DeviceName string //(255) DEFAULT NULL COMMENT '设备名称',
- Stationid int64 //(20) DEFAULT NULL COMMENT '所属变电站ID',
- Appid int // DEFAULT NULL COMMENT '所属APP ID',
- Manufacturer string //(255) DEFAULT NULL COMMENT '厂商名称',
- Model string //(255) DEFAULT NULL COMMENT '型号',
- RtspUrl string //(255) DEFAULT NULL COMMENT '视频流地址',
- RtspPort int // DEFAULT NULL COMMENT 'rtsp端口',
- Longitude string //(255) DEFAULT NULL COMMENT '经度',
- Latitude string //(255) DEFAULT NULL COMMENT '纬度',
- Position string // COMMENT '安装位置',
- IsRotate int //(2) DEFAULT '1' COMMENT '当前摄像头是否能转动,1能转动,-1不能转动',
- Online int // DEFAULT NULL COMMENT '设备在线状态 1离线 /2 在线 ',
- DeviceUsername string //(255) DEFAULT NULL COMMENT '设备登录用户名',
- DevicePassword string //(255) DEFAULT NULL COMMENT '设备登录密码',
- DeviceChannel int // DEFAULT NULL COMMENT '设备实际通道',
- DeviceType string //(255) DEFAULT NULL COMMENT '1枪机,2网络球机,3nvr',
- IsAlarmNotify int //(2) DEFAULT '0' COMMENT '是否开启告警上报,1为开启,其他为不开启',
- Disable int // DEFAULT '1' COMMENT '设备禁用标志。1未禁用 2禁用',
- CreateAt string // DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- UpdateAt string // DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间'
- }
- type Video_mpinfo struct {
- Id int `orm:"pk;auto"` // NOT NULL AUTO_INCREMENT COMMENT '视频测点信息表',
- Mpid int64 //(20) DEFAULT NULL COMMENT '测点ID。全局唯一索引',
- Mpname string //(255) DEFAULT NULL COMMENT '测点名称',
- Zonename string //(255) DEFAULT NULL COMMENT '所在区域名称',
- Positionname string //(255) DEFAULT NULL COMMENT '区域内位置',
- Appid int // DEFAULT NULL COMMENT '所属APP id',
- Deviceid int64 //(20) DEFAULT NULL COMMENT '所属设备id',
- Channel int // DEFAULT NULL COMMENT '通道号',
- Presetindex int // DEFAULT NULL COMMENT '预置位编号',
- Presetname string //(255) DEFAULT NULL COMMENT '预置位名称',
- Disable int // DEFAULT '1' COMMENT '停用标志。1-启用 2-停用, 默认启用',
- CreateAt string // DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- UpdateAt string // DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间'
- }
- type Log_operate struct {
- Id int64 `orm:"pk;auto"` // int(11) NOT NULL AUTO_INCREMENT,
- Context string // text COMMENT '日志内容',
- Appid int // int(11) DEFAULT NULL COMMENT '所属APP id',
- Usrname string // varchar(255) DEFAULT NULL COMMENT '操作用户名',
- CreateAt string // datetime DEFAULT CURRENT_TIMESTAMP COMMENT '操作时间',
- }
- type Sys_usr struct {
- Id int `orm:"pk;auto"`
- Usrname string
- Role int
- Status int
- Ip string
- }
- type T_base_blacklist struct {
- Id int64 `orm:"pk;auto"` // bigint NOT NULL AUTO_INCREMENT,
- Area string // varchar(100) DEFAULT NULL COMMENT '区域',
- Deviceid int64 // bigint DEFAULT NULL COMMENT '设备id',
- Devicename string // varchar(100) DEFAULT NULL COMMENT '设备名称',
- Devicecode string // varchar(100) DEFAULT NULL COMMENT '设备编号'
- Creator string // varchar(100) DEFAULT NULL COMMENT '添加人'
- }
- type T_base_blacklist_mplist struct {
- Id int64 `orm:"pk;auto"` // bigint NOT NULL AUTO_INCREMENT,
- Deviceid int64 // bigint DEFAULT NULL COMMENT '设备id',
- Mpid int64 // bigint DEFAULT NULL COMMENT '测点id',
- }
- type T_base_absolute_alarm struct {
- Id int64 `orm:"pk;auto"` // bigint NOT NULL AUTO_INCREMENT,
- Strategy_name string // varchar(100) NOT NULL COMMENT '策略名称',
- Alarm_level int // int NOT NULL COMMENT '告警等级',
- Mod_name string // varchar(100) NOT NULL COMMENT '模型名称',
- Mod_id int64 // bigint NOT NULL COMMENT '模型id',
- Operation_symbol string // varchar(100) NOT NULL COMMENT '操作符号',
- Threshold float32 // float NOT NULL COMMENT '阈值'
- }
- type T_base_rise_alarm struct {
- Id int64 `orm:"pk;auto"` // bigint NOT NULL AUTO_INCREMENT,
- Strategy_name string // varchar(100) NOT NULL COMMENT '策略名称',
- Alarm_level int // int NOT NULL COMMENT '告警等级',
- Mod_name string // varchar(100) NOT NULL COMMENT '模型名称',
- Mod_id int64 // bigint NOT NULL COMMENT '模型id',
- Upcycle int // int NOT NULL COMMENT '上升周期',
- Scope float32 // int NOT NULL COMMENT '升温范围'
- }
- type T_base_unbalance_alarm struct {
- Id int64 `orm:"pk;auto"` // bigint NOT NULL AUTO_INCREMENT,
- Strategy_name string // varchar(100) NOT NULL COMMENT '策略名称',
- Alarm_level int // int NOT NULL COMMENT '告警等级',
- Operation_symbol string // varchar(100) NOT NULL COMMENT '操作符号',
- Threshold float32 // float NOT NULL COMMENT '阈值'
- }
- type T_base_alone_alarm struct {
- Id int64 `orm:"pk;auto"` // bigint NOT NULL AUTO_INCREMENT,
- Deviceid int64 // bigint DEFAULT NULL COMMENT '设备id',
- Mpid int64 // bigint DEFAULT NULL COMMENT '测点id',
- Attrname string // varchar(100) NOT NULL COMMENT '测点属性名称',
- Mpname string // varchar(100) NOT NULL COMMENT '测点名称',
- Alarm_type int // int NOT NULL COMMENT '告警策略类型',
- Alarm_id int64 // bigint DEFAULT NULL COMMENT '告警id',
- Upcycle int // int NOT NULL COMMENT '上升周期',
- Threshold float32 // float NOT NULL COMMENT '阈值'
- }
- type T_base_alarm_his struct {
- Id int64 `orm:"pk;auto"` // bigint NOT NULL AUTO_INCREMENT,
- Deviceid int64 // bigint NOT NULL COMMENT '设备id',
- Devicename string // varchar(100) DEFAULT NULL COMMENT '设备名称',
- Mpid int64 // bigint NOT NULL COMMENT '测点id',
- Mpname string // varchar(50) DEFAULT NULL COMMENT '测点名称',
- Alarm_desc string // varchar(500) DEFAULT NULL COMMENT '告警描述',
- Alarm_type int // int DEFAULT NULL COMMENT '告警策略类型',
- Strategyid int64 // bigint DEFAULT NULL COMMENT '策略id',
- Alarm_value float32 // float DEFAULT NULL COMMENT '报警数值',
- Confirm int // int DEFAULT NULL COMMENT '用户是否确认',
- Confirmtime string // varchar(20) DEFAULT NULL COMMENT '否确认时间',
- Alarm_level int // int DEFAULT NULL COMMENT '告警等级',
- Region_id int // int DEFAULT NULL COMMENT '区域',
- Is_reset int // int DEFAULT NULL COMMENT '是否复归',
- Create_at string // varchar(20) DEFAULT NULL COMMENT '告警发生时间'
- }
- func init() {
- orm.RegisterModel(new(Alarm_event))
- orm.RegisterModel(new(Alarm_relation))
- orm.RegisterModel(new(Alarm_strategy))
- orm.RegisterModel(new(Dev_cpaction))
- orm.RegisterModel(new(Dev_cpinfo))
- orm.RegisterModel(new(Dev_task))
- orm.RegisterModel(new(Dev_task_action))
- orm.RegisterModel(new(Dev_task_event))
- orm.RegisterModel(new(Dev_task_exec))
- orm.RegisterModel(new(Link_event))
- orm.RegisterModel(new(Link_relation_action))
- orm.RegisterModel(new(Link_relation_obj))
- orm.RegisterModel(new(Link_strategy))
- orm.RegisterModel(new(Map_info))
- orm.RegisterModel(new(Sys_app))
- orm.RegisterModel(new(Video_action))
- orm.RegisterModel(new(Video_devinfo))
- orm.RegisterModel(new(Video_mpinfo))
- orm.RegisterModel(new(Dev_data_optimize))
- orm.RegisterModel(new(Dev_devinfo))
- orm.RegisterModel(new(Dev_mpinfo))
- orm.RegisterModel(new(Log_operate))
- orm.RegisterModel(new(Sys_usr))
- orm.RegisterModel(new(T_base_blacklist))
- orm.RegisterModel(new(T_base_absolute_alarm))
- orm.RegisterModel(new(T_base_rise_alarm))
- orm.RegisterModel(new(T_base_unbalance_alarm))
- orm.RegisterModel(new(T_base_alone_alarm))
- orm.RegisterModel(new(T_base_alarm_his))
- orm.RegisterModel(new(T_base_blacklist_mplist))
- }
|