servers
This commit is contained in:
@@ -16,6 +16,7 @@ type Model struct {
|
||||
Status string `json:"status" default:"initial"` // (initial|ready|waiting|running|success|error)
|
||||
Progress int `json:"progress"` // (0-100)
|
||||
Image string `json:"image"` // 封面圖片實際地址
|
||||
Hash string `json:"hash"` // 模型哈希值
|
||||
Tags string `json:"tags"`
|
||||
UserID int `json:"user_id"`
|
||||
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
|
||||
|
@@ -6,16 +6,17 @@ import (
|
||||
)
|
||||
|
||||
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"`
|
||||
Status string `json:"status"` // (異常|初始化|就緒|工作中|關閉中)
|
||||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
|
||||
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
|
||||
ID int `json:"id" gorm:"primary_key"`
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"` // (訓練|推理)
|
||||
IP string `json:"ip"`
|
||||
Port int `json:"port"`
|
||||
Status string `json:"status"` // (異常|初始化|就緒|工作中|關閉中)
|
||||
Username string `json:"username"`
|
||||
Password string `json:"password"`
|
||||
Models []map[string]interface{} `json:"models" gorm:"-"` // 數據庫不必保存
|
||||
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
|
||||
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
Reference in New Issue
Block a user