feat: add dashboard summary endpoint and related models, queries, and services
This commit is contained in:
30
internal/models/dashboard_model.go
Normal file
30
internal/models/dashboard_model.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package models
|
||||
|
||||
type TotalComponentStats struct {
|
||||
TotalTypes int64 `json:"totalTypes"`
|
||||
TotalQuantity int64 `json:"totalQuantity"`
|
||||
}
|
||||
|
||||
type AbnormalAlert struct {
|
||||
Status string `json:"status"`
|
||||
Count int64 `json:"count"`
|
||||
}
|
||||
|
||||
type TodayInvoiceCount struct {
|
||||
Type string `json:"type"`
|
||||
Count int64 `json:"count"`
|
||||
}
|
||||
|
||||
type ContainerStats struct {
|
||||
TotalContainers int64 `json:"totalContainers"`
|
||||
EmptyContainers int64 `json:"emptyContainers"`
|
||||
}
|
||||
|
||||
type DashboardSummary struct {
|
||||
TotalComponents TotalComponentStats `json:"totalComponents"`
|
||||
PendingInvoices int64 `json:"pendingInvoices"`
|
||||
LowStockComponents int64 `json:"lowStockComponents"`
|
||||
AbnormalAlerts []AbnormalAlert `json:"abnormalAlerts"`
|
||||
TodayInvoices []TodayInvoiceCount `json:"todayInvoices"`
|
||||
EmptyContainers ContainerStats `json:"emptyContainers"`
|
||||
}
|
||||
Reference in New Issue
Block a user