Files
warehouse-management-BE/internal/models/dashboard_model.go

55 lines
1.6 KiB
Go

package models
import "time"
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"`
}
type StockAlert struct {
ID int64 `json:"id"`
Name string `json:"name"`
Unit string `json:"unit"`
TotalQuantity int32 `json:"totalQuantity"`
MinQuantity int32 `json:"minQuantity"`
ComponentTypeID int64 `json:"componentTypeId"`
ComponentTypeName string `json:"componentTypeName"`
}
type AnomalyItem struct {
ID int64 `json:"id"`
ComponentID int64 `json:"componentId"`
ContainerID int64 `json:"containerId"`
Quantity int32 `json:"quantity"`
Status string `json:"status"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
ComponentName string `json:"componentName"`
ComponentUnit string `json:"componentUnit"`
}