20 lines
1.1 KiB
Go
20 lines
1.1 KiB
Go
package model
|
||
|
||
import (
|
||
"gorm.io/gorm"
|
||
)
|
||
|
||
type DeviceModel struct {
|
||
gorm.Model
|
||
ModelName string `gorm:"uniqueIndex" json:"model_name" form:"model_name"` // 设备型号名称
|
||
DeviceType string `gorm:"size:50" json:"device_type" form:"device_type"` // 设备类型
|
||
Company string `gorm:"size:255" json:"company" form:"company"` // 所属公司
|
||
Remark string `gorm:"size:500" json:"remark" form:"remark"` // 备注说明
|
||
DeviceCount int `gorm:"-" json:"device_count"` // 设备数量(非数据库字段)
|
||
CreatedBy uint `gorm:"index" json:"created_by"` // 创建者ID
|
||
CurrentVersion string `gorm:"size:50" json:"current_version"` // 当前版本
|
||
UpdateURL string `gorm:"size:255" json:"update_url"` // 更新地址
|
||
UpdateDesc string `gorm:"size:500" json:"update_desc"` // 更新说明
|
||
Status string `gorm:"size:20;default:active" json:"status"` // 状态:active/disabled
|
||
}
|