mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-08 18:23:45 +08:00
fix conflicts
This commit is contained in:
@@ -7,6 +7,6 @@ type ChatModel struct {
|
||||
Value string // API Key 的值
|
||||
SortNum int
|
||||
Enabled bool
|
||||
Weight int // 对话权重,每次对话扣减多少次对话额度
|
||||
Power int // 每次对话消耗算力
|
||||
Open bool // 是否开放模型给所有人使用
|
||||
}
|
||||
|
||||
@@ -10,6 +10,6 @@ type InviteLog struct {
|
||||
UserId uint
|
||||
Username string
|
||||
InviteCode string
|
||||
Reward string `gorm:"column:reward_json"` // 邀请奖励
|
||||
Remark string
|
||||
CreatedAt time.Time
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ type MidJourneyJob struct {
|
||||
UseProxy bool // 是否使用反代加载图片
|
||||
Publish bool //是否发布图片到画廊
|
||||
ErrMsg string // 报错信息
|
||||
Power int // 消耗算力
|
||||
CreatedAt time.Time
|
||||
}
|
||||
|
||||
|
||||
20
api/store/model/power_log.go
Normal file
20
api/store/model/power_log.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"chatplus/core/types"
|
||||
"time"
|
||||
)
|
||||
|
||||
// PowerLog 算力消费日志
|
||||
type PowerLog struct {
|
||||
Id uint `gorm:"primarykey;column:id"`
|
||||
UserId uint
|
||||
Username string
|
||||
Type types.PowerType
|
||||
Amount int
|
||||
Balance int
|
||||
Model string // 模型
|
||||
Remark string // 备注
|
||||
Mark types.PowerMark // 资金类型
|
||||
CreatedAt time.Time
|
||||
}
|
||||
@@ -7,8 +7,7 @@ type Product struct {
|
||||
Price float64
|
||||
Discount float64
|
||||
Days int
|
||||
Calls int
|
||||
ImgCalls int
|
||||
Power int
|
||||
Enabled bool
|
||||
Sales int
|
||||
SortNum int
|
||||
|
||||
@@ -13,6 +13,7 @@ type SdJob struct {
|
||||
Params string
|
||||
Publish bool //是否发布图片到画廊
|
||||
ErrMsg string // 报错信息
|
||||
Power int // 消耗算力
|
||||
CreatedAt time.Time
|
||||
}
|
||||
|
||||
|
||||
@@ -7,9 +7,7 @@ type User struct {
|
||||
Password string
|
||||
Avatar string
|
||||
Salt string // 密码盐
|
||||
TotalTokens int64 // 总消耗 tokens
|
||||
Calls int // 剩余对话次数
|
||||
ImgCalls int // 剩余绘图次数
|
||||
Power int // 剩余算力
|
||||
ChatConfig string `gorm:"column:chat_config_json"` // 聊天配置 json
|
||||
ChatRoles string `gorm:"column:chat_roles_json"` // 聊天角色
|
||||
ChatModels string `gorm:"column:chat_models_json"` // AI 模型,不同的用户拥有不同的聊天模型
|
||||
@@ -18,5 +16,4 @@ type User struct {
|
||||
LastLoginAt int64 // 最后登录时间
|
||||
LastLoginIp string // 最后登录 IP
|
||||
Vip bool // 是否 VIP 会员
|
||||
Tokens int
|
||||
}
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
package vo
|
||||
|
||||
import (
|
||||
"chatplus/core/types"
|
||||
)
|
||||
|
||||
type InviteLog struct {
|
||||
Id uint `json:"id"`
|
||||
InviterId uint `json:"inviter_id"`
|
||||
UserId uint `json:"user_id"`
|
||||
Username string `json:"username"`
|
||||
InviteCode string `json:"invite_code"`
|
||||
Reward types.InviteReward `json:"reward"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
Id uint `json:"id"`
|
||||
InviterId uint `json:"inviter_id"`
|
||||
UserId uint `json:"user_id"`
|
||||
Username string `json:"username"`
|
||||
InviteCode string `json:"invite_code"`
|
||||
Remark string `json:"remark"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
}
|
||||
|
||||
@@ -18,5 +18,6 @@ type MidJourneyJob struct {
|
||||
UseProxy bool `json:"use_proxy"`
|
||||
Publish bool `json:"publish"`
|
||||
ErrMsg string `json:"err_msg"`
|
||||
Power int `json:"power"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
16
api/store/vo/power_log.go
Normal file
16
api/store/vo/power_log.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package vo
|
||||
|
||||
import "chatplus/core/types"
|
||||
|
||||
type PowerLog struct {
|
||||
Id uint `json:"id"`
|
||||
UserId uint `json:"user_id"`
|
||||
Username string `json:"username"`
|
||||
Type types.PowerType `json:"name"`
|
||||
Amount int `json:"amount"`
|
||||
Mark types.PowerMark `json:"fund_type"`
|
||||
Balance int `json:"balance"`
|
||||
Model string `json:"model"`
|
||||
Remark string `json:"remark"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
}
|
||||
@@ -6,8 +6,7 @@ type Product struct {
|
||||
Price float64 `json:"price"`
|
||||
Discount float64 `json:"discount"`
|
||||
Days int `json:"days"`
|
||||
Calls int `json:"calls"`
|
||||
ImgCalls int `json:"img_calls"`
|
||||
Power int `json:"power"`
|
||||
Enabled bool `json:"enabled"`
|
||||
Sales int `json:"sales"`
|
||||
SortNum int `json:"sort_num"`
|
||||
|
||||
@@ -12,6 +12,5 @@ type Reward struct {
|
||||
}
|
||||
|
||||
type RewardExchange struct {
|
||||
Calls int `json:"calls"`
|
||||
ImgCalls int `json:"img_calls"`
|
||||
Power int `json:"calls"`
|
||||
}
|
||||
|
||||
@@ -16,5 +16,6 @@ type SdJob struct {
|
||||
Prompt string `json:"prompt"`
|
||||
Publish bool `json:"publish"`
|
||||
ErrMsg string `json:"err_msg"`
|
||||
Power int `json:"power"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
@@ -7,10 +7,8 @@ type User struct {
|
||||
Username string `json:"username"`
|
||||
Nickname string `json:"nickname"`
|
||||
Avatar string `json:"avatar"`
|
||||
Salt string `json:"salt"` // 密码盐
|
||||
TotalTokens int64 `json:"total_tokens"` // 总消耗tokens
|
||||
Calls int `json:"calls"` // 剩余对话次数
|
||||
ImgCalls int `json:"img_calls"`
|
||||
Salt string `json:"salt"` // 密码盐
|
||||
Power int `json:"calls"` // 剩余算力
|
||||
ChatConfig types.UserChatConfig `json:"chat_config"` // 聊天配置
|
||||
ChatRoles []string `json:"chat_roles"` // 聊天角色集合
|
||||
ChatModels []string `json:"chat_models"` // AI模型集合
|
||||
@@ -19,5 +17,4 @@ type User struct {
|
||||
LastLoginAt int64 `json:"last_login_at"` // 最后登录时间
|
||||
LastLoginIp string `json:"last_login_ip"` // 最后登录 IP
|
||||
Vip bool `json:"vip"`
|
||||
Tokens int `json:"token"` // 当月消耗的 fee
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user