Files
LicenseManger/internal/model/device_model.go
2024-11-14 22:55:43 +08:00

20 lines
1.1 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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
}