feat: add endpoints and logic for retrieving warehouse space usage and status distribution, including SQL queries, models, and service integration
This commit is contained in:
@@ -76,3 +76,20 @@ func ToDomainTopExportedComponent(r db.GetTopExportedComponentsRow) models.TopEx
|
||||
TotalExported: r.TotalExported,
|
||||
}
|
||||
}
|
||||
|
||||
func ToDomainStatusDistribution(r db.GetStatusDistributionRow) models.StatusDistributionItem {
|
||||
return models.StatusDistributionItem{
|
||||
Status: string(r.Status),
|
||||
Count: r.Count,
|
||||
TotalQuantity: r.TotalQuantity,
|
||||
}
|
||||
}
|
||||
|
||||
func ToDomainSpaceUsage(r db.GetSpaceUsageRow) models.SpaceUsageItem {
|
||||
return models.SpaceUsageItem{
|
||||
Warehouse: r.Warehouse,
|
||||
Room: r.Room,
|
||||
TotalContainers: r.TotalContainers,
|
||||
UsedContainers: r.UsedContainers,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user