answer/internal/schema/dashboard_schema.go

40 lines
1.3 KiB
Go
Raw Normal View History

2022-11-02 16:29:10 +08:00
package schema
2022-11-08 11:33:48 +08:00
import "time"
var AppStartTime time.Time
2022-11-09 14:58:15 +08:00
const (
DashboardCacheKey = "answer:dashboard"
DashboardCacheTime = 60 * time.Minute
2022-11-09 14:58:15 +08:00
)
2022-11-02 16:29:10 +08:00
type DashboardInfo struct {
2022-11-07 12:45:01 +08:00
QuestionCount int64 `json:"question_count"`
AnswerCount int64 `json:"answer_count"`
CommentCount int64 `json:"comment_count"`
VoteCount int64 `json:"vote_count"`
UserCount int64 `json:"user_count"`
ReportCount int64 `json:"report_count"`
UploadingFiles bool `json:"uploading_files"`
SMTP bool `json:"smtp"`
HTTPS bool `json:"https"`
TimeZone string `json:"time_zone"`
OccupyingStorageSpace string `json:"occupying_storage_space"`
AppStartTime string `json:"app_start_time"`
VersionInfo DashboardInfoVersion `json:"version_info"`
}
type DashboardInfoVersion struct {
Version string `json:"version"`
2023-03-24 11:49:23 +08:00
Revision string `json:"revision"`
2022-11-07 12:45:01 +08:00
RemoteVersion string `json:"remote_version"`
}
type RemoteVersion struct {
Release struct {
Version string `json:"version"`
URL string `json:"url"`
} `json:"release"`
2022-11-02 16:29:10 +08:00
}