43 lines
3.6 KiB
Go
43 lines
3.6 KiB
Go
package model
|
|
|
|
// NeInfo 网元_基础信息表 关联创建版本、主机
|
|
type NeInfo struct {
|
|
ID int64 `json:"id" gorm:"column:id;primaryKey;autoIncrement"` // 网元ID
|
|
CreateBy string `json:"createBy" gorm:"column:create_by"` // 创建者
|
|
CreateTime int64 `json:"createTime" gorm:"column:create_time"` // 创建时间
|
|
UpdateBy string `json:"updateBy" gorm:"column:update_by"` // 更新者
|
|
UpdateTime int64 `json:"updateTime" gorm:"column:update_time"` // 更新时间
|
|
Remark string `json:"remark" gorm:"column:remark"` // 备注
|
|
CoreId int64 `json:"coreId" gorm:"column:core_id"` // 核心网ID 0为默认
|
|
NeUid string `json:"neUid" gorm:"column:ne_uid"` // 网元唯一标识
|
|
NeType string `json:"neType" gorm:"column:ne_type" binding:"required"` // 网元类型
|
|
NeName string `json:"neName" gorm:"column:ne_name"` // 网元名称
|
|
IpAddr string `json:"ipAddr" gorm:"column:ip_addr" binding:"required"` // 网元服务IP
|
|
Port int64 `json:"port" gorm:"column:port"` // 端口
|
|
PvFlag string `json:"pvFlag" gorm:"column:pv_flag" binding:"omitempty,oneof=PNF VNF"` // 网元虚拟化标识 物理PNF 虚拟VNF
|
|
Province string `json:"province" gorm:"column:province"` // 省份地域
|
|
VendorName string `json:"vendorName" gorm:"column:vendor_name"` // 厂商名称
|
|
Dn string `json:"dn" gorm:"column:dn"` // 网络标识
|
|
MacAddr string `json:"macAddr" gorm:"column:mac_addr"` // MAC地址
|
|
ActivationRequestCode string `json:"activationRequestCode" gorm:"column:activation_request_code"` // 激活申请代码
|
|
LicensePath string `json:"licensePath" gorm:"column:license_path"` // 激活授权文件
|
|
SerialNum string `json:"serialNum" gorm:"column:serial_num"` // 序列号
|
|
ExpiryDate string `json:"expiryDate" gorm:"column:expiry_date"` // 许可证到期日期
|
|
UeNumber int64 `json:"ueNumber" gorm:"column:ue_number"` // 用户容量
|
|
NbNumber int64 `json:"nbNumber" gorm:"column:nb_number"` // 基站容量
|
|
HostIds string `json:"hostIds" gorm:"column:host_ids"` // 网元主机ID组 数据格式(ssh,telnet) UDM(ssh,telnet,redis) UPF(ssh,telnet,telnet)
|
|
Status int64 `json:"status" gorm:"column:status"` // 网元状态 0离线 1在线 2配置待下发 3备用模式 4授权无效
|
|
|
|
// ====== 非数据库字段属性 ======
|
|
|
|
CoreUid string `json:"coreUid,omitempty" gorm:"->"` // 核心网唯一标识
|
|
CoreName string `json:"coreName,omitempty" gorm:"->"` // 核心网名称
|
|
ServerState map[string]any `json:"serverState,omitempty" gorm:"-"` // 服务状态
|
|
Hosts []NeHost `json:"hosts,omitempty" gorm:"-"` // 主机对象组
|
|
}
|
|
|
|
// TableName 表名称
|
|
func (*NeInfo) TableName() string {
|
|
return "ne_info"
|
|
}
|