mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-10 19:23:42 +08:00
feat: add authorization for MidJourney function calls
This commit is contained in:
@@ -3,15 +3,16 @@ package model
|
||||
import "time"
|
||||
|
||||
type MidJourneyJob struct {
|
||||
Id uint `gorm:"primarykey;column:id"`
|
||||
UserId uint
|
||||
ChatId string
|
||||
MessageId string
|
||||
Hash string
|
||||
Content string
|
||||
Prompt string
|
||||
Image string
|
||||
CreatedAt time.Time
|
||||
Id uint `gorm:"primarykey;column:id"`
|
||||
UserId uint
|
||||
ChatId string
|
||||
MessageId string
|
||||
ReferenceId string
|
||||
Hash string
|
||||
Content string
|
||||
Prompt string
|
||||
Image string
|
||||
CreatedAt time.Time
|
||||
}
|
||||
|
||||
func (MidJourneyJob) TableName() string {
|
||||
|
||||
@@ -10,6 +10,7 @@ type User struct {
|
||||
Salt string // 密码盐
|
||||
Tokens int64 // 剩余tokens
|
||||
Calls int // 剩余对话次数
|
||||
ImgCalls int // 剩余绘图次数
|
||||
ChatConfig string `gorm:"column:chat_config_json"` // 聊天配置 json
|
||||
ChatRoles string `gorm:"column:chat_roles_json"` // 聊天角色
|
||||
ExpiredTime int64 // 账户到期时间
|
||||
|
||||
Reference in New Issue
Block a user