feat: 网元软件包和网元版本struct
This commit is contained in:
21
src/modules/network_element/model/ne_software.go
Normal file
21
src/modules/network_element/model/ne_software.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
// NeSoftware 网元软件包 ne_software
|
||||
type NeSoftware struct {
|
||||
ID string `json:"id" gorm:"id"`
|
||||
NeType string `json:"neType" gorm:"ne_type"` // 网元类型
|
||||
FileName string `json:"fileName" gorm:"file_name"` // 包名称
|
||||
Path string `json:"path" gorm:"path"` // 包路径
|
||||
Version string `json:"version" gorm:"version"` // 包版本
|
||||
Md5Sum string `json:"md5Sum" gorm:"md5_sum"` // --无使用 md5签名
|
||||
Status string `json:"status" gorm:"status"` // --无使用
|
||||
Comment string `json:"comment" gorm:"comment"` // 包说明
|
||||
UpdateTime time.Time `json:"updateTime" gorm:"update_time"` // 上传时间
|
||||
}
|
||||
|
||||
// TableName 表名称
|
||||
func (*NeSoftware) TableName() string {
|
||||
return "ne_software"
|
||||
}
|
||||
23
src/modules/network_element/model/ne_version.go
Normal file
23
src/modules/network_element/model/ne_version.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
// NeVersion 网元版本信息 ne_version
|
||||
type NeVersion struct {
|
||||
ID string `json:"id" gorm:"id"`
|
||||
NeType string `json:"neType" gorm:"ne_type" binding:"required"` // 网元类型
|
||||
NeId string `json:"neId" gorm:"ne_id" binding:"required"` // 网元ID
|
||||
Version string `json:"version" gorm:"version"` // 当前版本
|
||||
FilePath string `json:"filePath" gorm:"file_path"` // 当前软件包
|
||||
PreVersion string `json:"preVersion" gorm:"pre_version"` // 上一版本
|
||||
PreFile string `json:"preFile" gorm:"pre_file"` // 上一版本软件包
|
||||
NewVersion string `json:"newVersion" gorm:"new_version"` // 下一版本
|
||||
NewFile string `json:"newFile" gorm:"new_file"` // 下一版本软件包
|
||||
Status string `json:"status" gorm:"status" binding:"oneof=Uploaded Inactive Active"` // 当前状态 (Uploaded下一版本上传 Inactive下一版本待激活 Active当前已激活)
|
||||
UpdateTime time.Time `json:"updateTime" gorm:"update_time"` // 更新时间
|
||||
}
|
||||
|
||||
// TableName 表名称
|
||||
func (*NeVersion) TableName() string {
|
||||
return "ne_version"
|
||||
}
|
||||
Reference in New Issue
Block a user