對齊
This commit is contained in:
		
							
								
								
									
										22
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								README.md
									
									
									
									
									
								
							@@ -46,17 +46,17 @@ WS     | /api/{name}/{item_id}          | Websocket 連接對象
 | 
				
			|||||||
對象模型:
 | 
					對象模型:
 | 
				
			||||||
```go
 | 
					```go
 | 
				
			||||||
type Model struct {
 | 
					type Model struct {
 | 
				
			||||||
	ID           int      `json:"id"`
 | 
						ID           int    `json:"id"`
 | 
				
			||||||
	Name         string   `json:"name"`
 | 
						Name         string `json:"name"`
 | 
				
			||||||
	Type         string   `json:"type"`          // (lora|ckp|hyper|ti)
 | 
						Type         string `json:"type"`          // (lora|ckp|hyper|ti)
 | 
				
			||||||
	TriggerWords string   `json:"trigger_words"` // 觸發詞
 | 
						TriggerWords string `json:"trigger_words"` // 觸發詞
 | 
				
			||||||
	BaseModel    string   `json:"base_model"`    // (SD1.5|SD2)
 | 
						BaseModel    string `json:"base_model"`    // (SD1.5|SD2)
 | 
				
			||||||
	ModelPath    string   `json:"model_path"`    // 模型路徑
 | 
						ModelPath    string `json:"model_path"`    // 模型路徑
 | 
				
			||||||
	Status       string   `json:"status"`        // (waiting|running|success|error)
 | 
						Status       string `json:"status"`        // (waiting|running|success|error)
 | 
				
			||||||
	Progress     int      `json:"progress"`      // (0-100)
 | 
						Progress     int    `json:"progress"`      // (0-100)
 | 
				
			||||||
	Tags         []string `json:"tags"`
 | 
						Tags         string `json:"tags"`
 | 
				
			||||||
	CreatedAt    string   `json:"created_at"`
 | 
						CreatedAt    string `json:"created_at"`
 | 
				
			||||||
	UpdatedAt    string   `json:"updated_at"`
 | 
						UpdatedAt    string `json:"updated_at"`
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
```javascript
 | 
					```javascript
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -37,8 +37,12 @@ func init() {
 | 
				
			|||||||
			id INTEGER PRIMARY KEY AUTOINCREMENT,
 | 
								id INTEGER PRIMARY KEY AUTOINCREMENT,
 | 
				
			||||||
			name TEXT,
 | 
								name TEXT,
 | 
				
			||||||
			type TEXT,
 | 
								type TEXT,
 | 
				
			||||||
 | 
								trigger_words TEXT,
 | 
				
			||||||
 | 
								base_model TEXT,
 | 
				
			||||||
 | 
								model_path TEXT,
 | 
				
			||||||
			status TEXT,
 | 
								status TEXT,
 | 
				
			||||||
			progress INTEGER,
 | 
								progress INTEGER,
 | 
				
			||||||
 | 
								tags TEXT,
 | 
				
			||||||
			created_at TEXT,
 | 
								created_at TEXT,
 | 
				
			||||||
			updated_at TEXT
 | 
								updated_at TEXT
 | 
				
			||||||
		);
 | 
							);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,17 +6,17 @@ import (
 | 
				
			|||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type Model struct {
 | 
					type Model struct {
 | 
				
			||||||
	ID           int      `json:"id"`
 | 
						ID           int    `json:"id"`
 | 
				
			||||||
	Name         string   `json:"name"`
 | 
						Name         string `json:"name"`
 | 
				
			||||||
	Type         string   `json:"type"`          // (lora|ckp|hyper|ti)
 | 
						Type         string `json:"type"`          // (lora|ckp|hyper|ti)
 | 
				
			||||||
	TriggerWords string   `json:"trigger_words"` // 觸發詞
 | 
						TriggerWords string `json:"trigger_words"` // 觸發詞
 | 
				
			||||||
	BaseModel    string   `json:"base_model"`    // (SD1.5|SD2)
 | 
						BaseModel    string `json:"base_model"`    // (SD1.5|SD2)
 | 
				
			||||||
	ModelPath    string   `json:"model_path"`    // 模型路徑
 | 
						ModelPath    string `json:"model_path"`    // 模型路徑
 | 
				
			||||||
	Status       string   `json:"status"`        // (waiting|running|success|error)
 | 
						Status       string `json:"status"`        // (waiting|running|success|error)
 | 
				
			||||||
	Progress     int      `json:"progress"`      // (0-100)
 | 
						Progress     int    `json:"progress"`      // (0-100)
 | 
				
			||||||
	Tags         []string `json:"tags"`
 | 
						Tags         string `json:"tags"`
 | 
				
			||||||
	CreatedAt    string   `json:"created_at"`
 | 
						CreatedAt    string `json:"created_at"`
 | 
				
			||||||
	UpdatedAt    string   `json:"updated_at"`
 | 
						UpdatedAt    string `json:"updated_at"`
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (model *Model) Create() error {
 | 
					func (model *Model) Create() error {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user