get server by id

This commit is contained in:
Fran Jurmanović
2025-02-13 01:09:16 +01:00
parent 6fbc718a47
commit d5140783ca
7 changed files with 165 additions and 98 deletions

View File

@@ -2,10 +2,11 @@ package model
// Server represents an ACC server instance
type Server struct {
ID uint `gorm:"primaryKey"`
Name string `gorm:"not null"`
IP string `gorm:"not null"`
Port int `gorm:"not null"`
ConfigPath string `gorm:"not null"` // e.g. "/acc/servers/server1/"
ServiceName string `gorm:"not null"` // Windows service name
ID uint `gorm:"primaryKey" json:"id"`
Name string `gorm:"not null" json:"name"`
Status string `json:"status"`
IP string `gorm:"not null" json:"-"`
Port int `gorm:"not null" json:"-"`
ConfigPath string `gorm:"not null" json:"-"` // e.g. "/acc/servers/server1/"
ServiceName string `gorm:"not null" json:"-"` // Windows service name
}