123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- package dto
- import (
- "time"
- "go-admin/app/admin/models"
- "go-admin/common/dto"
- common "go-admin/common/models"
- )
- type OtFireEventsGetPageReq struct {
- dto.Pagination `search:"-"`
- AppId int64 `form:"appId" search:"type:exact;column:app_id;table:ot_fire_events" comment:"业务ID"`
- RuleId int64 `form:"ruleId" search:"type:exact;column:rule_id;table:ot_fire_events" comment:""`
- ExceptionName string `form:"exceptionName" search:"type:contains;column:exception_name;table:ot_fire_events" comment:"告警名称/信息"`
- AppName string `form:"appName" search:"type:exact;column:app_name;table:ot_fire_events" comment:""`
- AppAlias string `form:"appAlias" search:"type:exact;column:app_alias;table:ot_fire_events" comment:""`
- AlertStatus int64 `form:"alertStatus" search:"type:exact;column:alert_status;table:ot_fire_events" comment:""`
- IsKnow int64 `form:"isKnow" search:"type:exact;column:is_know;table:ot_fire_events" comment:"已知悉"`
- IsResolve int64 `form:"isResolve" search:"type:exact;column:is_resolve;table:ot_fire_events" comment:"已解决"`
- IsIgnore int64 `form:"isIgnore" search:"type:exact;column:is_ignore;table:ot_fire_events" comment:"已忽略"`
- OtFireEventsOrder
- }
- type OtFireEventsOrder struct {
- Id string `form:"idOrder" search:"type:order;column:id;table:ot_fire_events"`
- AppId string `form:"appIdOrder" search:"type:order;column:app_id;table:ot_fire_events"`
- RuleId string `form:"ruleIdOrder" search:"type:order;column:rule_id;table:ot_fire_events"`
- ExceptionName string `form:"exceptionNameOrder" search:"type:order;column:exception_name;table:ot_fire_events"`
- RecordTime string `form:"recordTimeOrder" search:"type:order;column:record_time;table:ot_fire_events"`
- AppendTime string `form:"appendTimeOrder" search:"type:order;column:append_time;table:ot_fire_events"`
- Uid string `form:"uidOrder" search:"type:order;column:uid;table:ot_fire_events"`
- AppName string `form:"appNameOrder" search:"type:order;column:app_name;table:ot_fire_events"`
- AppAlias string `form:"appAliasOrder" search:"type:order;column:app_alias;table:ot_fire_events"`
- RuleInfo string `form:"ruleInfoOrder" search:"type:order;column:rule_info;table:ot_fire_events"`
- RowResult string `form:"rowResultOrder" search:"type:order;column:row_result;table:ot_fire_events"`
- RowsResult string `form:"rowsResultOrder" search:"type:order;column:rows_result;table:ot_fire_events"`
- AlertStatus string `form:"alertStatusOrder" search:"type:order;column:alert_status;table:ot_fire_events"`
- IsKnow string `form:"isKnowOrder" search:"type:order;column:is_know;table:ot_fire_events"`
- IsResolve string `form:"isResolveOrder" search:"type:order;column:is_resolve;table:ot_fire_events"`
- IsIgnore string `form:"isIgnoreOrder" search:"type:order;column:is_ignore;table:ot_fire_events"`
- CreatedAt string `form:"createdAtOrder" search:"type:order;column:created_at;table:ot_fire_events"`
- UpdatedAt string `form:"updatedAtOrder" search:"type:order;column:updated_at;table:ot_fire_events"`
- DeletedAt string `form:"deletedAtOrder" search:"type:order;column:deleted_at;table:ot_fire_events"`
- CreateBy string `form:"createByOrder" search:"type:order;column:create_by;table:ot_fire_events"`
- UpdateBy string `form:"updateByOrder" search:"type:order;column:update_by;table:ot_fire_events"`
- }
- func (m *OtFireEventsGetPageReq) GetNeedSearch() interface{} {
- return *m
- }
- type OtFireEventsInsertReq struct {
- Id int `json:"-" comment:"业务应用告警规则表"` // 业务应用告警规则表
- AppId int64 `json:"appId" comment:"业务ID"`
- RuleId int64 `json:"ruleId" comment:""`
- ExceptionName string `json:"exceptionName" comment:"告警名称/信息"`
- RecordTime time.Time `json:"recordTime" comment:""`
- AppendTime time.Time `json:"appendTime" comment:""`
- Uid string `json:"uid" comment:""`
- AppName string `json:"appName" comment:""`
- AppAlias string `json:"appAlias" comment:""`
- RuleInfo string `json:"ruleInfo" comment:""`
- RowResult string `json:"rowResult" comment:""`
- RowsResult string `json:"rowsResult" comment:""`
- AlertStatus int64 `json:"alertStatus" comment:""`
- IsKnow int64 `json:"isKnow" comment:"已知悉"`
- IsResolve int64 `json:"isResolve" comment:"已解决"`
- IsIgnore int64 `json:"isIgnore" comment:"已忽略"`
- common.ControlBy
- }
- func (s *OtFireEventsInsertReq) Generate(model *models.OtFireEvents) {
- if s.Id == 0 {
- model.Model = common.Model{Id: s.Id}
- }
- model.AppId = s.AppId
- model.RuleId = s.RuleId
- model.ExceptionName = s.ExceptionName
- model.RecordTime = s.RecordTime
- model.AppendTime = s.AppendTime
- model.Uid = s.Uid
- model.AppName = s.AppName
- model.AppAlias = s.AppAlias
- model.RuleInfo = s.RuleInfo
- model.RowResult = s.RowResult
- model.RowsResult = s.RowsResult
- model.AlertStatus = s.AlertStatus
- model.IsKnow = s.IsKnow
- model.IsResolve = s.IsResolve
- model.IsIgnore = s.IsIgnore
- model.CreateBy = s.CreateBy // 添加这而,需要记录是被谁创建的
- }
- func (s *OtFireEventsInsertReq) GetId() interface{} {
- return s.Id
- }
- type OtFireEventsUpdateReq struct {
- Id int `uri:"id" comment:"业务应用告警规则表"` // 业务应用告警规则表
- AppId int64 `json:"appId" comment:"业务ID"`
- RuleId int64 `json:"ruleId" comment:""`
- ExceptionName string `json:"exceptionName" comment:"告警名称/信息"`
- RecordTime time.Time `json:"recordTime" comment:""`
- AppendTime time.Time `json:"appendTime" comment:""`
- Uid string `json:"uid" comment:""`
- AppName string `json:"appName" comment:""`
- AppAlias string `json:"appAlias" comment:""`
- RuleInfo string `json:"ruleInfo" comment:""`
- RowResult string `json:"rowResult" comment:""`
- RowsResult string `json:"rowsResult" comment:""`
- AlertStatus int64 `json:"alertStatus" comment:""`
- IsKnow int64 `json:"isKnow" comment:"已知悉"`
- IsResolve int64 `json:"isResolve" comment:"已解决"`
- IsIgnore int64 `json:"isIgnore" comment:"已忽略"`
- common.ControlBy
- }
- func (s *OtFireEventsUpdateReq) Generate(model *models.OtFireEvents) {
- if s.Id == 0 {
- model.Model = common.Model{Id: s.Id}
- }
- model.AppId = s.AppId
- model.RuleId = s.RuleId
- model.ExceptionName = s.ExceptionName
- model.RecordTime = s.RecordTime
- model.AppendTime = s.AppendTime
- model.Uid = s.Uid
- model.AppName = s.AppName
- model.AppAlias = s.AppAlias
- model.RuleInfo = s.RuleInfo
- model.RowResult = s.RowResult
- model.RowsResult = s.RowsResult
- model.AlertStatus = s.AlertStatus
- model.IsKnow = s.IsKnow
- model.IsResolve = s.IsResolve
- model.IsIgnore = s.IsIgnore
- model.UpdateBy = s.UpdateBy // 添加这而,需要记录是被谁更新的
- }
- func (s *OtFireEventsUpdateReq) GetId() interface{} {
- return s.Id
- }
- // OtFireEventsGetReq 功能获取请求参数
- type OtFireEventsGetReq struct {
- Id int `uri:"id"`
- }
- func (s *OtFireEventsGetReq) GetId() interface{} {
- return s.Id
- }
- // OtFireEventsDeleteReq 功能删除请求参数
- type OtFireEventsDeleteReq struct {
- Ids []int `json:"ids"`
- }
- func (s *OtFireEventsDeleteReq) GetId() interface{} {
- return s.Ids
- }
|