mirror of
https://github.com/yangjian102621/geekai.git
synced 2026-04-24 20:14:26 +08:00
修正模型外键的数据类型为 uint
This commit is contained in:
@@ -2,9 +2,8 @@ package vo
|
||||
|
||||
type AdminUser struct {
|
||||
BaseVo
|
||||
Username string `json:"username"`
|
||||
Status bool `json:"status"` // 当前状态
|
||||
LastLoginAt int64 `json:"last_login_at"` // 最后登录时间
|
||||
LastLoginIp string `json:"last_login_ip"` // 最后登录 IP
|
||||
RoleIds interface{} `json:"role_ids"` //角色ids
|
||||
Username string `json:"username"`
|
||||
Status bool `json:"status"` // 当前状态
|
||||
LastLoginAt int64 `json:"last_login_at"` // 最后登录时间
|
||||
LastLoginIp string `json:"last_login_ip"` // 最后登录 IP
|
||||
}
|
||||
|
||||
@@ -5,14 +5,14 @@ import "geekai/core/types"
|
||||
type ChatRole struct {
|
||||
BaseVo
|
||||
Key string `json:"key"` // 角色唯一标识
|
||||
Tid int `json:"tid"`
|
||||
Tid uint `json:"tid"`
|
||||
Name string `json:"name"` // 角色名称
|
||||
Context []types.Message `json:"context"` // 角色语料信息
|
||||
HelloMsg string `json:"hello_msg"` // 打招呼的消息
|
||||
Icon string `json:"icon"` // 角色聊天图标
|
||||
Enable bool `json:"enable"` // 是否启用被启用
|
||||
SortNum int `json:"sort"` // 排序
|
||||
ModelId int `json:"model_id"` // 绑定模型 ID
|
||||
ModelId uint `json:"model_id"` // 绑定模型 ID
|
||||
ModelName string `json:"model_name"` // 模型名称
|
||||
TypeName string `json:"type_name"` // 分类名称
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package vo
|
||||
type MidJourneyJob struct {
|
||||
Id uint `json:"id"`
|
||||
Type string `json:"type"`
|
||||
UserId int `json:"user_id"`
|
||||
UserId uint `json:"user_id"`
|
||||
ChannelId string `json:"channel_id"`
|
||||
TaskId string `json:"task_id"`
|
||||
MessageId string `json:"message_id"`
|
||||
|
||||
@@ -3,14 +3,14 @@ package vo
|
||||
import "math"
|
||||
|
||||
type Page struct {
|
||||
Items interface{} `json:"items"`
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
Total int64 `json:"total"`
|
||||
TotalPage int `json:"total_page"`
|
||||
Items any `json:"items"`
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
Total int64 `json:"total"`
|
||||
TotalPage int `json:"total_page"`
|
||||
}
|
||||
|
||||
func NewPage(total int64, page int, pageSize int, items interface{}) Page {
|
||||
func NewPage(total int64, page int, pageSize int, items any) Page {
|
||||
totalPage := math.Ceil(float64(total) / float64(pageSize))
|
||||
return Page{
|
||||
Items: items,
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type SdJob struct {
|
||||
Id uint `json:"id"`
|
||||
Type string `json:"type"`
|
||||
UserId int `json:"user_id"`
|
||||
UserId uint `json:"user_id"`
|
||||
TaskId string `json:"task_id"`
|
||||
ImgURL string `json:"img_url"`
|
||||
Params types.SdTaskParams `json:"params"`
|
||||
|
||||
@@ -2,7 +2,7 @@ package vo
|
||||
|
||||
type SunoJob struct {
|
||||
Id uint `json:"id"`
|
||||
UserId int `json:"user_id"`
|
||||
UserId uint `json:"user_id"`
|
||||
Channel string `json:"channel"`
|
||||
Title string `json:"title"`
|
||||
Type int `json:"type"`
|
||||
|
||||
@@ -2,7 +2,7 @@ package vo
|
||||
|
||||
type VideoJob struct {
|
||||
Id uint `json:"id"`
|
||||
UserId int `json:"user_id"`
|
||||
UserId uint `json:"user_id"`
|
||||
Channel string `json:"channel"`
|
||||
Type string `json:"type"`
|
||||
TaskId string `json:"task_id"`
|
||||
|
||||
Reference in New Issue
Block a user