feat: add endpoints for retrieving stock alerts and anomaly items, including database queries and models
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type TotalComponentStats struct {
|
||||
TotalTypes int64 `json:"totalTypes"`
|
||||
TotalQuantity int64 `json:"totalQuantity"`
|
||||
@@ -28,3 +30,25 @@ type DashboardSummary struct {
|
||||
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"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user