27 lines
1.1 KiB
Go
27 lines
1.1 KiB
Go
package model
|
|
|
|
import "time"
|
|
|
|
// SummaryReport is a read-only DTO for summary report responses.
|
|
// It does NOT map to a database table — it queries the existing reporting_events_rollups table.
|
|
// Reference: Chatwoot SummaryReport controller — collection GET endpoints for agent/team/inbox/label summaries.
|
|
type SummaryReport struct {
|
|
AccountID uint `json:"account_id"`
|
|
Metric RollupMetric `json:"metric"`
|
|
DimensionType DimensionType `json:"dimension_type"`
|
|
DimensionID uint `json:"dimension_id"`
|
|
Value float64 `json:"value"`
|
|
Count int64 `json:"count"`
|
|
Since time.Time `json:"since"`
|
|
Until time.Time `json:"until"`
|
|
}
|
|
|
|
// SummaryReportItem is a single item in a summary report collection response.
|
|
// Each item represents a dimension entity (agent/team/inbox/label) with its aggregated metrics.
|
|
type SummaryReportItem struct {
|
|
ID uint `json:"id"`
|
|
Name string `json:"name"`
|
|
Metric RollupMetric `json:"metric"`
|
|
Value float64 `json:"value"`
|
|
Count int64 `json:"count"`
|
|
} |