Files
ai/models/Server.go
2023-05-16 01:56:10 +08:00

23 lines
545 B
Go

package models
import (
"main/configs"
"time"
)
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 time.Time `json:"created_at" gorm:"autoCreateTime"`
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
}
func init() {
configs.ORMDB().AutoMigrate(&Server{})
}