✨ 新增几大中心功能
This commit is contained in:
67
server/model/admin/dashboard_stats.go
Normal file
67
server/model/admin/dashboard_stats.go
Normal file
@@ -0,0 +1,67 @@
|
||||
package admin
|
||||
|
||||
// DashboardStats 与 web-admin `DashboardStats` 对齐,供 /admin/dashboard/stats 返回。
|
||||
// 当前为占位实现:各统计为零,列表为空;后续可按业务表聚合替换。
|
||||
type DashboardStats struct {
|
||||
Users DashboardUserStats `json:"users"`
|
||||
Characters DashboardCharacterStats `json:"characters"`
|
||||
Creators DashboardCreatorStats `json:"creators"`
|
||||
Feedback DashboardFeedbackStats `json:"feedback"`
|
||||
System DashboardSystemStats `json:"system"`
|
||||
}
|
||||
|
||||
type DashboardUserStats struct {
|
||||
Total int `json:"total"`
|
||||
CreatorCount int `json:"creatorCount"`
|
||||
OnlineCount int `json:"onlineCount"`
|
||||
TodayNew int `json:"todayNew"`
|
||||
WeekNew int `json:"weekNew"`
|
||||
TotalMessages int `json:"totalMessages"`
|
||||
TotalChats int `json:"totalChats"`
|
||||
}
|
||||
|
||||
type DashboardCharacterStats struct {
|
||||
Total int `json:"total"`
|
||||
Published int `json:"published"`
|
||||
PendingReview int `json:"pendingReview"`
|
||||
TodayNew int `json:"todayNew"`
|
||||
WeekNew int `json:"weekNew"`
|
||||
}
|
||||
|
||||
type DashboardTopCreator struct {
|
||||
UserId int `json:"userId"`
|
||||
NickName string `json:"nickName"`
|
||||
Avatar string `json:"avatar"`
|
||||
CharCount int `json:"charCount"`
|
||||
TotalUseCount int `json:"totalUseCount"`
|
||||
}
|
||||
|
||||
type DashboardCreatorStats struct {
|
||||
Total int `json:"total"`
|
||||
Contracted int `json:"contracted"`
|
||||
TodayNew int `json:"todayNew"`
|
||||
WeekNew int `json:"weekNew"`
|
||||
PendingApplications int `json:"pendingApplications"`
|
||||
TopCreators []DashboardTopCreator `json:"topCreators"`
|
||||
}
|
||||
|
||||
type DashboardFeedbackPendingItem struct {
|
||||
ID int `json:"id"`
|
||||
Title string `json:"title"`
|
||||
UserNickname string `json:"userNickname"`
|
||||
UserAvatar string `json:"userAvatar"`
|
||||
UnreadCount int `json:"unreadCount"`
|
||||
CreatedAt string `json:"createdAt"`
|
||||
}
|
||||
|
||||
type DashboardFeedbackStats struct {
|
||||
Total int `json:"total"`
|
||||
Open int `json:"open"`
|
||||
AdminUnread int `json:"adminUnread"`
|
||||
ClosedToday int `json:"closedToday"`
|
||||
PendingItems []DashboardFeedbackPendingItem `json:"pendingItems"`
|
||||
}
|
||||
|
||||
type DashboardSystemStats struct {
|
||||
TotalConversations int `json:"totalConversations"`
|
||||
}
|
||||
Reference in New Issue
Block a user