LicenseManger/internal/model/device_model.go

20 lines
1.1 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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
}