更改推理结构

This commit is contained in:
2023-06-28 14:29:44 +08:00
parent 9bcd9540ef
commit 723eca3353
7 changed files with 211 additions and 384 deletions

View File

@@ -170,24 +170,6 @@ message "$response" "上傳圖片" true
// @fit: 裁切方式 cover contain fill auto
```
任務:
```go
type Task struct {
ID int `json:"id" gorm:"primary_key"`
Name string `json:"name"`
Type string `json:"type"` // 任務類型(訓練|推理)
Status string `json:"status"` // (initial|ready|waiting|running|success|error)
Progress int `json:"progress"` // (0-100)
UserID int `json:"user_id"`
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
}
```
- [x] GET [/api/tasks](/api/tasks) 任務列表(全部任務)
- [x] POST [/api/tasks](/api/tasks) 創建任務
參數: