forked from longtao.wu/droboticflow
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit bba61d328712b54225dd2ebc87d344c4f4d9a746)
50 lines
2.5 KiB
Go
50 lines
2.5 KiB
Go
package domain
|
|
|
|
// Additive, explicitly named metrics. The legacy event counters remain readable.
|
|
// Video durations are never presented as time spent working.
|
|
type WorkforceStatistics struct {
|
|
FirstSubmittedTasks int64 `json:"firstSubmittedTasks"`
|
|
SubmissionCount int64 `json:"submissionCount"`
|
|
ReworkSubmissionCount int64 `json:"reworkSubmissionCount"`
|
|
UnknownSubmissionCount int64 `json:"unknownSubmissionCount"`
|
|
FirstVideoSeconds float64 `json:"firstVideoSeconds"`
|
|
ReworkVideoSeconds float64 `json:"reworkVideoSeconds"`
|
|
UnknownVideoCount int64 `json:"unknownVideoCount"`
|
|
// Review video seconds price each formal review decision by the slice-range
|
|
// union of the version decided; repeat reviews add up. Decisions without a
|
|
// reliable slice version are counted as unknown, never as zero seconds.
|
|
ReviewVideoSeconds float64 `json:"reviewVideoSeconds"`
|
|
UnknownReviewVideoCount int64 `json:"unknownReviewVideoCount"`
|
|
// Review output counts formal quality and acceptance decisions (approved
|
|
// and rejected); repeat reviews add up. Kept apart from annotator output.
|
|
ReviewDecisionCount int64 `json:"reviewDecisionCount"`
|
|
QualityReturns WorkforceReturnMetrics `json:"qualityReturns"`
|
|
AcceptanceReturns WorkforceReturnMetrics `json:"acceptanceReturns"`
|
|
}
|
|
|
|
type WorkforceReturnMetrics struct {
|
|
DecisionCount int64 `json:"decisionCount"`
|
|
TaskCount int64 `json:"taskCount"`
|
|
ProblemCount int64 `json:"problemCount"`
|
|
SliceCount int64 `json:"sliceCount"`
|
|
VideoSeconds float64 `json:"videoSeconds"`
|
|
UnlocatedCount int64 `json:"unlocatedCount"`
|
|
UnknownDetailCount int64 `json:"unknownDetailCount"`
|
|
}
|
|
|
|
type WorkforceReturnDetail struct {
|
|
ID string `json:"id"`
|
|
UserID string `json:"userId"`
|
|
SupplierID string `json:"supplierId"`
|
|
ProjectID string `json:"projectId"`
|
|
TaskID string `json:"taskId"`
|
|
TaskIDs []string `json:"taskIds"`
|
|
Stage string `json:"stage"`
|
|
Round int `json:"round"`
|
|
CreatedAt string `json:"createdAt"`
|
|
Metrics WorkforceReturnMetrics `json:"metrics"`
|
|
Problems []ReviewProblem `json:"problems"`
|
|
Comment string `json:"comment,omitempty"`
|
|
AttributionUnknown bool `json:"attributionUnknown,omitempty"`
|
|
}
|