Refactor API tags in swagger.yaml to use shortened prefixes
- Updated tags from 'network_data' to 'ne_data' for consistency and brevity. - Changed 'network_element' to 'ne' across various endpoints for improved readability. - Adjusted related descriptions in the tags section to reflect the new naming conventions.
This commit is contained in:
49
src/modules/ne_data/model/kpi_report.go
Normal file
49
src/modules/ne_data/model/kpi_report.go
Normal file
@@ -0,0 +1,49 @@
|
||||
package model
|
||||
|
||||
// KpiTitle 指标标题信息对象 kpi_title
|
||||
type KpiTitle struct {
|
||||
ID int64 `json:"id" gorm:"column:id;primaryKey;autoIncrement"`
|
||||
NeType string `json:"neType" gorm:"column:ne_type"` // 网元类型
|
||||
KpiId string `json:"kpiId" gorm:"column:kpi_id"` // KPI标识
|
||||
TitleJson string `json:"titleJson" gorm:"column:title_json"`
|
||||
CnTitle string `json:"cnTitle" gorm:"column:cn_title"` // 中文名
|
||||
EnTitle string `json:"enTitle" gorm:"column:en_title"` // 英文名
|
||||
StatusFlag string `json:"statusFlag" gorm:"column:status_flag"` // 状态标识 1:启用 0:禁用
|
||||
}
|
||||
|
||||
// TableName 表名称
|
||||
func (*KpiTitle) TableName() string {
|
||||
return "kpi_title"
|
||||
}
|
||||
|
||||
// KpiReport 指标报表信息对象
|
||||
type KpiReport struct {
|
||||
ID int64 `json:"id" gorm:"column:id;primaryKey;autoIncrement"`
|
||||
NeType string `json:"neType" gorm:"column:ne_type"`
|
||||
NeName string `json:"neName" gorm:"column:ne_name"`
|
||||
RmUid string `json:"rmUid" gorm:"column:rm_uid"`
|
||||
Date string `json:"date" gorm:"column:date"` // Date of the report yyyy-mm-dd hh:mi:ss
|
||||
StartTime string `json:"startTime" gorm:"column:start_time"` // Start time of the report hh:mi:ss
|
||||
EndTime string `json:"endTime" gorm:"column:end_time"` // End time of the report hh:mi:ss
|
||||
Index int64 `json:"index" gorm:"column:index"` // Index of the report
|
||||
Granularity int64 `json:"granularity" gorm:"column:granularity"` // Time granualarity: 5/10/.../60/300 (second)
|
||||
KpiValues string `json:"kpiValues" gorm:"column:kpi_values"` // KPI values JSON String
|
||||
CreatedAt int64 `json:"createdAt" gorm:"column:created_at"` // Creation time 接收到的timestamp秒级存储毫秒时间戳
|
||||
}
|
||||
|
||||
// TableName 表名称
|
||||
func (*KpiReport) TableName() string {
|
||||
return "kpi_report"
|
||||
}
|
||||
|
||||
// KPIQuery 指标查询参数结构体
|
||||
type KPIQuery struct {
|
||||
NeType string `form:"neType" binding:"required"`
|
||||
NeID string `form:"neId" binding:"required"`
|
||||
BeginTime int64 `form:"beginTime" binding:"required"` // 开始时间戳(毫秒)1739361200999
|
||||
EndTime int64 `form:"endTime" binding:"required"` // 结束时间戳(毫秒)1739361210088
|
||||
Interval int64 `form:"interval" binding:"required,oneof=5 60 300 900 1800 3600"`
|
||||
RmUID string `form:"rmUID"`
|
||||
SortField string `form:"sortField" binding:"omitempty,oneof=timeGroup"`
|
||||
SortOrder string `form:"sortOrder" binding:"omitempty,oneof=asc desc"`
|
||||
}
|
||||
Reference in New Issue
Block a user