This commit is contained in:
2026-08-15 03:14:56 +08:00
parent a34133cce5
commit 2a3c55bb53
71 changed files with 1445 additions and 1076 deletions
+59
View File
@@ -1,5 +1,7 @@
package dto
import "time"
type LoginRequest struct {
Username string `json:"username"`
Password string `json:"password"`
@@ -71,3 +73,60 @@ type LoginLogRequest struct {
Agent string
UserID uint
}
type UserResponse struct {
ID uint `json:"ID"`
CreatedAt time.Time `json:"CreatedAt"`
UpdatedAt time.Time `json:"UpdatedAt"`
DeletedAt any `json:"DeletedAt"`
UUID string `json:"uuid"`
Username string `json:"userName"`
NickName string `json:"nickName"`
HeaderImg string `json:"headerImg"`
AuthorityID uint `json:"authorityId"`
Authority *AuthorityResponse `json:"authority"`
Authorities []*AuthorityResponse `json:"authorities"`
DeptID uint `json:"deptId"`
Department any `json:"dept"`
Departments []*DepartmentResponse `json:"departments"`
Positions []*PositionResponse `json:"positions"`
Phone string `json:"phone"`
Email string `json:"email"`
Enable int `json:"enable"`
OriginSetting map[string]any `json:"originSetting"`
}
type ServerInfoResponse struct {
OS ServerOSResponse `json:"os"`
CPU ServerCPUResponse `json:"cpu"`
RAM ServerRAMResponse `json:"ram"`
Disk []ServerDiskResponse `json:"disk"`
}
type ServerOSResponse struct {
GOOS string `json:"goos"`
NumCPU int `json:"numCpu"`
Compiler string `json:"compiler"`
GoVersion string `json:"goVersion"`
NumGoroutine int `json:"numGoroutine"`
}
type ServerCPUResponse struct {
CPUs []float64 `json:"cpus"`
Cores int `json:"cores"`
}
type ServerRAMResponse struct {
UsedMB uint64 `json:"usedMb"`
TotalMB uint64 `json:"totalMb"`
UsedPercent int `json:"usedPercent"`
}
type ServerDiskResponse struct {
MountPoint string `json:"mountPoint"`
UsedMB uint64 `json:"usedMb"`
UsedGB uint64 `json:"usedGb"`
TotalMB uint64 `json:"totalMb"`
TotalGB uint64 `json:"totalGb"`
UsedPercent int `json:"usedPercent"`
}