LicenseManger/internal/model/device_log.go

24 lines
650 B
Go
Raw Permalink 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 DeviceLog struct {
gorm.Model
DeviceUID string `gorm:"index" json:"device_uid"` // 设备UID
Action string `json:"action"` // 操作类型register/start/verify/bind/unbind
Message string `json:"message"` // 详细信息
Status string `json:"status"` // 状态success/failed
IP string `json:"ip"` // 操作IP
}
// 定义日志操作类型常量
const (
LogActionRegister = "register"
LogActionStart = "start"
LogActionVerify = "verify"
LogActionBind = "bind"
LogActionUnbind = "unbind"
)