style: gorm数据逻辑id字段补上自增属性
This commit is contained in:
@@ -4,7 +4,7 @@ import "time"
|
||||
|
||||
// Alarm 告警数据对象 alarm
|
||||
type Alarm struct {
|
||||
ID string `json:"id" gorm:"id"`
|
||||
ID string `json:"id" gorm:"column:id;primaryKey;autoIncrement"`
|
||||
AlarmSeq string `json:"alarmSeq" gorm:"alarm_seq"`
|
||||
AlarmId string `json:"alarmId" gorm:"alarm_id"`
|
||||
AlarmTitle string `json:"alarmTitle" gorm:"alarm_title"`
|
||||
|
||||
@@ -2,7 +2,7 @@ package model
|
||||
|
||||
// NeInfo 网元信息对象 ne_info
|
||||
type NeInfo struct {
|
||||
ID string `json:"id" gorm:"id"`
|
||||
ID string `json:"id" gorm:"column:id;primaryKey;autoIncrement"`
|
||||
NeType string `json:"neType" gorm:"ne_type" binding:"required"`
|
||||
NeId string `json:"neId" gorm:"ne_id" binding:"required"`
|
||||
RmUID string `json:"rmUid" gorm:"rm_uid"`
|
||||
|
||||
@@ -2,7 +2,7 @@ package model
|
||||
|
||||
// NeLicense 网元授权激活信息 ne_license
|
||||
type NeLicense struct {
|
||||
ID string `json:"id" gorm:"id"`
|
||||
ID string `json:"id" gorm:"column:id;primaryKey;autoIncrement"`
|
||||
NeType string `json:"neType" gorm:"ne_type" binding:"required"` // 网元类型
|
||||
NeId string `json:"neId" gorm:"ne_id" binding:"required"` // 网元ID
|
||||
ActivationRequestCode string `json:"activationRequestCode" gorm:"activation_request_code"` // 激活申请代码
|
||||
|
||||
@@ -2,7 +2,7 @@ package model
|
||||
|
||||
// NeSoftware 网元软件包 ne_software
|
||||
type NeSoftware struct {
|
||||
ID string `json:"id" gorm:"id"`
|
||||
ID string `json:"id" gorm:"column:id;primaryKey;autoIncrement"`
|
||||
NeType string `json:"neType" gorm:"ne_type" binding:"required"` // 网元类型
|
||||
Name string `json:"name" gorm:"name" binding:"required"` // 包名称
|
||||
Path string `json:"path" gorm:"path"` // 包路径
|
||||
|
||||
@@ -2,7 +2,7 @@ package model
|
||||
|
||||
// NeVersion 网元版本信息 ne_version
|
||||
type NeVersion struct {
|
||||
ID string `json:"id" gorm:"id"`
|
||||
ID string `json:"id" gorm:"column:id;primaryKey;autoIncrement"`
|
||||
NeType string `json:"neType" gorm:"ne_type" binding:"required"` // 网元类型
|
||||
NeId string `json:"neId" gorm:"ne_id" binding:"required"` // 网元ID
|
||||
Name string `json:"name" gorm:"name"` // 当前包名
|
||||
|
||||
Reference in New Issue
Block a user