package model import "time" // Firmware 固件版本 type Firmware struct { ID int64 `gorm:"primaryKey;column:id;type:BIGINT;not null" json:"id"` Component string `gorm:"column:component;type:VARCHAR(32);not null" json:"component"` // 固定 dock-edge-agent Version string `gorm:"column:version;type:VARCHAR(32);not null" json:"version"` // 1.3.0 Description string `gorm:"column:description;type:VARCHAR(512);default:''" json:"description"` FileURL string `gorm:"column:file_url;type:VARCHAR(512);not null" json:"fileUrl"` Sha256 string `gorm:"column:sha256;type:VARCHAR(128);not null" json:"sha256"` Signature string `gorm:"column:signature;type:TEXT;not null" json:"signature"` FileSize int64 `gorm:"column:file_size;type:BIGINT;default:0" json:"fileSize"` Mandatory int8 `gorm:"column:mandatory;type:TINYINT;default:0" json:"mandatory"` Status string `gorm:"column:status;type:VARCHAR(16);default:draft" json:"status"` // draft / released / deprecated CreatedBy int64 `gorm:"column:created_by;type:BIGINT;not null" json:"createdBy"` CreatedAt time.Time `gorm:"column:created_at" json:"createdAt"` UpdatedAt time.Time `gorm:"column:updated_at" json:"updatedAt"` } func (Firmware) TableName() string { return "firmware" }