Add IP field, ping service, status endpoint and UI; update README
This commit is contained in:
@@ -9,7 +9,8 @@ type PC struct {
|
||||
ID int `json:"id" db:"id"`
|
||||
Name string `json:"name" db:"name"`
|
||||
MAC string `json:"mac" db:"mac"`
|
||||
CreatedAt time.Time `json:"created_at" db:"created_at"`
|
||||
IP string `json:"ip" db:"ip"`
|
||||
CreatedAt time.Time `json:"created_at" db:"updated_at"`
|
||||
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
|
||||
}
|
||||
|
||||
@@ -17,12 +18,14 @@ type PC struct {
|
||||
type CreatePCRequest struct {
|
||||
Name string `json:"name" binding:"required"`
|
||||
MAC string `json:"mac" binding:"required"`
|
||||
IP string `json:"ip" binding:"required"`
|
||||
}
|
||||
|
||||
// UpdatePCRequest repräsentiert die Anfrage zum Aktualisieren eines PCs
|
||||
type UpdatePCRequest struct {
|
||||
Name string `json:"name" binding:"required"`
|
||||
MAC string `json:"mac" binding:"required"`
|
||||
IP string `json:"ip" binding:"required"`
|
||||
}
|
||||
|
||||
// PCResponse repräsentiert die Antwort für PC-Operationen
|
||||
@@ -32,3 +35,12 @@ type PCResponse struct {
|
||||
PC *PC `json:"pc,omitempty"`
|
||||
PCs []PC `json:"pcs,omitempty"`
|
||||
}
|
||||
|
||||
// PCStatus repräsentiert den Online-Status eines PCs
|
||||
type PCStatus struct {
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
MAC string `json:"mac"`
|
||||
IP string `json:"ip"`
|
||||
Online bool `json:"online"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user