mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-06 17:23:42 +08:00
feat: add implements for stable diffusion service
This commit is contained in:
20
api/store/model/sd_job.go
Normal file
20
api/store/model/sd_job.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
type SdJob struct {
|
||||
Id uint `gorm:"primarykey;column:id"`
|
||||
Type string
|
||||
UserId int
|
||||
TaskId string
|
||||
ImgURL string
|
||||
Progress int
|
||||
Prompt string
|
||||
Params string
|
||||
Started bool
|
||||
CreatedAt time.Time
|
||||
}
|
||||
|
||||
func (SdJob) TableName() string {
|
||||
return "chatgpt_sd_jobs"
|
||||
}
|
||||
19
api/store/vo/sd_job.go
Normal file
19
api/store/vo/sd_job.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package vo
|
||||
|
||||
import (
|
||||
"chatplus/core/types"
|
||||
"time"
|
||||
)
|
||||
|
||||
type SdJob struct {
|
||||
Id uint `json:"id"`
|
||||
Type string `json:"type"`
|
||||
UserId int `json:"user_id"`
|
||||
TaskId string `json:"task_id"`
|
||||
ImgURL string `json:"img_url"`
|
||||
Params types.SdParams `json:"params"`
|
||||
Progress int `json:"progress"`
|
||||
Prompt string `json:"prompt"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
Started bool `json:"started"`
|
||||
}
|
||||
Reference in New Issue
Block a user