25 lines
822 B
Go
25 lines
822 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
// RemoteServer registers an external 3m-ui / Mihomo host managed from this
|
|
// panel. Multi-node is metadata + health check first; full remote config
|
|
// push is a later phase (agent/token based).
|
|
type RemoteServer struct {
|
|
gorm.Model
|
|
|
|
Name string `gorm:"size:100;not null" json:"name"`
|
|
BaseURL string `gorm:"size:512;not null" json:"base_url"`
|
|
APIToken string `gorm:"size:256" json:"-"`
|
|
APITokenSet bool `gorm:"-" json:"api_token_set"`
|
|
Enabled bool `gorm:"not null;default:true" json:"enabled"`
|
|
Remark string `gorm:"size:255" json:"remark"`
|
|
LastStatus string `gorm:"size:32" json:"last_status"`
|
|
LastCheckAt *time.Time `json:"last_check_at"`
|
|
LastError string `gorm:"type:text" json:"last_error"`
|
|
}
|