Files
kra-new/internal/service/dto/performance.go
T

183 lines
6.7 KiB
Go

package dto
type DashboardQuery struct {
Sources []string `form:"sourceDbList"`
Period string `form:"period"`
Begin string `form:"begin"`
End string `form:"end"`
}
type DashboardOverview struct {
Cards map[string]*WorkbenchCard `json:"cards"`
Begin string `json:"begin"`
End string `json:"end"`
Settings OtherSettingsValues `json:"settings"`
Available bool `json:"available"`
}
type BusinessMemberResponse struct {
*BusinessAccountResponse
HireDate string `json:"hireDate"`
Employment string `json:"employment"`
GroupID uint64 `json:"groupId"`
GroupName string `json:"groupName"`
CanEdit bool `json:"canEdit"`
CanSetGoal bool `json:"canSetGoal"`
}
type BusinessGroupResponse struct {
ID uint64 `json:"id"`
Name string `json:"name"`
MemberIDs []uint `json:"memberIds"`
CanEdit bool `json:"canEdit"`
CanSetGoal bool `json:"canSetGoal"`
Mine bool `json:"mine"`
Partial bool `json:"partial"`
Overlapping bool `json:"overlapping"`
Relation string `json:"relation"`
ChannelCount int64 `json:"channelCount"`
}
type TeamResponse struct {
Revision uint64 `json:"revision"`
Groups []*BusinessGroupResponse `json:"groups"`
Members []*BusinessMemberResponse `json:"members"`
CanManage bool `json:"canManage"`
ViewerID uint `json:"viewerId"`
}
type GroupInput struct {
ID uint64 `json:"id"`
Name string `json:"name"`
MemberIDs []uint `json:"memberIds"`
}
type GroupSaveRequest struct {
Revision *uint64 `json:"revision"`
Groups []*GroupInput `json:"groups"`
}
type MemberProfileRequest struct {
UserID uint `json:"userId"`
RealName string `json:"realName"`
Phone string `json:"phoneNumber"`
HireDate string `json:"hireDate"`
Employment string `json:"employment"`
Password string `json:"password"`
}
type PerformanceQuery struct {
Year *int `form:"year"`
BeginMonth *int `form:"beginMonth"`
EndMonth *int `form:"endMonth"`
Name string `form:"name"`
Level *int `form:"level"`
GroupID *uint64 `form:"groupId"`
Sort string `form:"sort"`
Order string `form:"order"`
View string `form:"view"`
}
type PerformanceMetrics struct {
Open int64 `json:"open"`
Effective int64 `json:"effective"`
Pay string `json:"pay"`
}
type PerformancePeriod struct {
Key string `json:"key"`
Label string `json:"label"`
Begin string `json:"begin"`
End string `json:"end"`
}
type GoalResponse struct {
Open *int64 `json:"open"`
Effective *int64 `json:"effective"`
Amount *int64 `json:"amount"`
UpdatedBy uint `json:"updatedBy"`
UpdatedAt string `json:"updatedAt"`
}
type PerformanceRow struct {
Member *BusinessMemberResponse `json:"member"`
Total PerformanceMetrics `json:"total"`
Rate *string `json:"rate"`
Periods map[string]PerformanceMetrics `json:"periods"`
Goals map[string]*GoalResponse `json:"goals"`
DescendantCount int `json:"descendantCount"`
}
type PerformanceGroupRow struct {
Group *BusinessGroupResponse `json:"group"`
Total PerformanceMetrics `json:"total"`
UniqueTotal PerformanceMetrics `json:"uniqueTotal"`
Periods map[string]PerformanceMetrics `json:"periods"`
UniquePeriods map[string]PerformanceMetrics `json:"uniquePeriods"`
Members []*PerformanceRow `json:"members"`
Goals map[string]*GoalResponse `json:"goals"`
}
type PerformancePage struct {
MatrixTotal PerformanceMetrics `json:"matrixTotal"`
MatrixRate *string `json:"matrixRate"`
MatrixTrend map[string]PerformanceMetrics `json:"matrixTrend"`
Prior PerformanceMetrics `json:"prior"`
Rows []*PerformanceRow `json:"rows"`
Groups []*PerformanceGroupRow `json:"groups"`
Total PerformanceMetrics `json:"total"`
Rate *string `json:"rate"`
ProductiveMembers int64 `json:"productiveMembers"`
Periods []PerformancePeriod `json:"periods"`
Trend map[string]PerformanceMetrics `json:"trend"`
Begin string `json:"begin"`
End string `json:"end"`
Granularity string `json:"granularity"`
Settings OtherSettingsValues `json:"settings"`
Available bool `json:"available"`
}
type PerformanceDetailQuery struct {
MemberIDs string `form:"memberIds"`
Kind string `form:"kind"`
TargetID uint64 `form:"targetId"`
Begin string `form:"begin"`
End string `form:"end"`
Metric string `form:"metric"`
Page int `form:"page"`
Size int `form:"size"`
}
type PerformanceChannel struct {
ContributorID uint `json:"contributorId"`
ContributorName string `json:"contributorName"`
SourceDB string `json:"sourceDb"`
SourceDBLabel string `json:"sourceDbLabel"`
ID uint64 `json:"id,string"`
Account string `json:"account"`
Name string `json:"name"`
OwnerName string `json:"ownerName"`
CreatedAt *int64 `json:"createdAt"`
QualifiedAt *int64 `json:"qualifiedAt"`
WindowPay string `json:"windowPay"`
PeriodPay string `json:"periodPay"`
}
type PerformanceDetailPage struct {
Rows []*PerformanceChannel `json:"rows"`
Total int64 `json:"total"`
}
type GoalQuery struct {
Kind string `form:"kind"`
TargetID uint64 `form:"targetId"`
}
type GoalRequest struct {
Kind string `json:"kind"`
TargetID uint64 `json:"targetId"`
Month string `json:"month"`
Open *int64 `json:"open"`
Effective *int64 `json:"effective"`
Amount *int64 `json:"amount"`
}
type GoalMonthResponse struct {
Available bool `json:"available"`
Month string `json:"month"`
Goal *GoalResponse `json:"goal"`
Actual PerformanceMetrics `json:"actual"`
Status string `json:"status"`
Missing int `json:"missing"`
CanEdit bool `json:"canEdit"`
}
type GoalPage struct {
Kind string `json:"kind"`
TargetID uint64 `json:"targetId"`
Name string `json:"name"`
CanEdit bool `json:"canEdit"`
Months []GoalMonthResponse `json:"months"`
MemberGoals map[string]PerformanceMetrics `json:"memberGoals"`
}