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:
TsMask
2025-08-21 14:30:09 +08:00
parent a72aa00f89
commit 45e226ce1a
171 changed files with 1177 additions and 741 deletions

View File

@@ -0,0 +1,35 @@
package model
// NEState 网元状态记录表 ne_state
type NEState struct {
ID int64 `json:"id" gorm:"column:id;primaryKey;autoIncrement"`
NeType string `json:"neType" gorm:"column:ne_type"`
NeId string `json:"neId" gorm:"column:ne_id"`
Version string `json:"version" gorm:"column:version"` // 版本
Capability int64 `json:"capability" gorm:"column:capability"` // 用户容量
SerialNum string `json:"serialNum" gorm:"column:serial_num"` // 序列号
ExpiryDate string `json:"expiryDate" gorm:"column:expiry_date"` // 许可证到期日期
SysCpuUsage float64 `json:"sysCpuUsage" gorm:"column:sys_cpu_usage"` // cpu使用率-sys
SysMemUsage float64 `json:"sysMemUsage" gorm:"column:sys_mem_usage"` // 内存使用率-sys
SysDiskUsage float64 `json:"sysDiskUsage" gorm:"column:sys_disk_usage"` // 磁盘使用率-sys
NfCpuUsage float64 `json:"nfCpuUsage" gorm:"column:nf_cpu_usage"` // cpu使用率-nf
NfMemUsed int64 `json:"nfMemUsed" gorm:"column:nf_mem_used"` // 内存使用KB-nf
CreateTime int64 `json:"createTime" gorm:"column:create_time"` // 创建时间
}
// TableName 表名称
func (*NEState) TableName() string {
return "ne_state"
}
// NEStateQuery 查询参数结构体
type NEStateQuery struct {
NeType string `json:"neType" form:"neType" binding:"required"`
NeID string `json:"neId" form:"neId" binding:"required"`
PageNum int64 `json:"pageNum" form:"pageNum" binding:"required"`
PageSize int64 `json:"pageSize" form:"pageSize" binding:"required"`
BeginTime string `json:"beginTime" form:"beginTime"`
EndTime string `json:"endTime" form:"endTime"`
SortField string `json:"sortField" form:"sortField" binding:"omitempty,oneof=id create_time"` // 排序字段,填写结果字段
SortOrder string `json:"sortOrder" form:"sortOrder" binding:"omitempty,oneof=asc desc"` // 排序升降序asc desc
}