22 lines
466 B
Go
22 lines
466 B
Go
package models
|
|
|
|
import (
|
|
"main/configs"
|
|
)
|
|
|
|
type Server struct {
|
|
ID int `json:"id" gorm:"primary_key"`
|
|
Name string `json:"name"`
|
|
Type string `json:"type"` // (訓練|推理)
|
|
IP string `json:"ip"`
|
|
Port int `json:"port"`
|
|
Username string `json:"username"`
|
|
Password string `json:"password"`
|
|
CreatedAt string `json:"created_at"`
|
|
UpdatedAt string `json:"updated_at"`
|
|
}
|
|
|
|
func init() {
|
|
configs.ORMDB().AutoMigrate(&Server{})
|
|
}
|