feat: dashboard aggregates, notifications, websocket route tracking

This commit is contained in:
2026-04-17 17:02:48 +03:00
parent 0d8df9ed7d
commit 36dac1840b
11 changed files with 504 additions and 3 deletions

View File

@@ -0,0 +1,30 @@
package models
import "github.com/google/uuid"
type DashboardRevenue struct {
Total float64 `json:"total"`
ThisMonth float64 `json:"thisMonth"`
}
type DashboardOrderStatus struct {
Total int `json:"total`
Delivered int `json:"delivered"`
InTransit int `json:"inTransit`
Pending int `json:"pending"`
Cancelled int `json:"cancelled"`
}
type DashboardDriverStat struct {
ID uuid.UUID `json:"id"`
FullName string `json:"fullName"`
Status string `json:"status"`
Rating float64 `json:"rating"`
CompletedOrders int `json:"completedOrders"`
}
type DashboardReport struct {
Revenue DashboardRevenue `json:"revenue"`
Orders DashboardOrderStatus `json:"orders"`
Drivers []DashboardDriverStat `json:"drivers"`
}