kontenhumas-be/app/module/approval_workflows/response/approval_workflows.response.go

49 lines
1.5 KiB
Go

package response
import (
approvalWorkflowStepsResponse "netidhub-saas-be/app/module/approval_workflow_steps/response"
"time"
)
type ApprovalWorkflowsResponse struct {
ID uint `json:"id"`
Name string `json:"name"`
Description *string `json:"description"`
IsActive bool `json:"isActive"`
CreatedBy uint `json:"createdBy"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
// Relations
Steps []*approvalWorkflowStepsResponse.ApprovalWorkflowStepsResponse `json:"steps,omitempty"`
}
type ApprovalWorkflowsWithStepsResponse struct {
ID uint `json:"id"`
Name string `json:"name"`
Description *string `json:"description"`
IsActive bool `json:"isActive"`
CreatedBy uint `json:"createdBy"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
// Relations
Steps []*approvalWorkflowStepsResponse.ApprovalWorkflowStepsResponse `json:"steps"`
}
type ApprovalWorkflowsSummaryResponse struct {
ID uint `json:"id"`
Name string `json:"name"`
Description *string `json:"description"`
IsActive bool `json:"isActive"`
StepCount int `json:"stepCount"`
}
type ApprovalWorkflowsStatsResponse struct {
TotalWorkflows int `json:"totalWorkflows"`
ActiveWorkflows int `json:"activeWorkflows"`
InactiveWorkflows int `json:"inactiveWorkflows"`
TotalSteps int `json:"totalSteps"`
AverageStepsPerFlow int `json:"averageStepsPerFlow"`
}