package models import ( "time" ) // LogEvent repräsentiert ein Log-Ereignis in der Datenbank type LogEvent struct { ID int `json:"id" db:"id"` Timestamp time.Time `json:"timestamp" db:"timestamp"` PCID int `json:"pc_id" db:"pc_id"` PCName string `json:"pc_name" db:"pc_name"` MAC string `json:"mac" db:"mac"` Trigger string `json:"trigger" db:"trigger"` // "button" oder "cron" } // CreateLogRequest repräsentiert die Anfrage zum Erstellen eines neuen Log-Eintrags type CreateLogRequest struct { PCID int `json:"pc_id" binding:"required"` PCName string `json:"pc_name" binding:"required"` MAC string `json:"mac" binding:"required"` Trigger string `json:"trigger" binding:"required"` } // LogResponse repräsentiert die Antwort für Log-Operationen type LogResponse struct { Success bool `json:"success"` Message string `json:"message,omitempty"` Log *LogEvent `json:"log,omitempty"` Logs []LogEvent `json:"logs,omitempty"` }