71 lines
2.3 KiB
Go
71 lines
2.3 KiB
Go
package proto
|
|
|
|
// 基础统计信息,会话数,问答数,用户数,今日处理问答数
|
|
type DashBoardStatisticsSt struct {
|
|
SessionNum int64 `json:"session_num"`
|
|
MessageCount int64 `json:"message_count"`
|
|
UserCount int64 `json:"user_count"`
|
|
TodayMessageCount int64 `json:"today_message_count"`
|
|
}
|
|
|
|
// 统计过去一周每天的会话数、消息数
|
|
type DashBoardStatisticsWeekSt struct {
|
|
SessionCount []DashBoardStatisticsWeekCount `json:"session_count"`
|
|
MessageCount []DashBoardStatisticsWeekCount `json:"message_count"`
|
|
}
|
|
|
|
type DashBoardStatisticsWeekCount struct {
|
|
Count int64 `json:"count"`
|
|
}
|
|
|
|
type DashBoardStatisticsResp struct {
|
|
DashBoardStatisticsSt DashBoardStatisticsSt `json:"dashboard_statistics_st"`
|
|
DashBoardStatisticsWeekSt DashBoardStatisticsWeekSt `json:"dashboard_statistics_week"`
|
|
// 模型的使用统计
|
|
DashBoardStatisticsModelSt []MessageModelIDCountSt `json:"dashboard_statistics_model_st"`
|
|
}
|
|
|
|
type MessageModelIDCountSt struct {
|
|
ModelID uint `json:"model_id"`
|
|
ModelName string `json:"name"`
|
|
Count int `json:"value"`
|
|
}
|
|
|
|
type FileContentReq struct {
|
|
UserFileID int `json:"user_file_id" form:"user_file_id"` // 用户文件ID
|
|
FileID int `json:"file_id" form:"file_id"` // 文件ID
|
|
FileContent string `json:"file_content" form:"file_content"` // 文件内容
|
|
}
|
|
|
|
type FileContentResp struct {
|
|
Code int `json:"code"`
|
|
Message string `json:"message"`
|
|
Data any `json:"data"`
|
|
}
|
|
|
|
type GenerateResp struct {
|
|
Code int `json:"code"`
|
|
Message string `json:"message"`
|
|
Data any `json:"data"`
|
|
}
|
|
|
|
type MessageConvertFileReq struct {
|
|
MessageID int `json:"message_id" form:"message_id"` // 消息ID
|
|
FileType string `json:"file_type" form:"file_type"` // 需要转成的文件类型
|
|
FileName string `json:"file_name" form:"file_name"` // 文件名称
|
|
}
|
|
|
|
// 第三方登录
|
|
type ThirdPartyLoginStatus struct {
|
|
Status int `json:"status"` // 登录状态,0:登录成功,1:登录失败
|
|
Type string `json:"type"` // 登录类型,qq,github
|
|
UserInfo UserLoginInfo `json:"user_info"` // 用户信息
|
|
}
|
|
|
|
type UserLoginInfo struct {
|
|
UserID int `json:"id"` // 用户ID
|
|
Username string `json:"username"` // 用户名
|
|
Email string `json:"email"` // 用户邮箱
|
|
Token string `json:"token"` // 用户token
|
|
}
|