update order status
This commit is contained in:
@@ -28,8 +28,10 @@ type UpdateInventoryRequest struct {
|
||||
}
|
||||
|
||||
type InventoryAdjustmentRequest struct {
|
||||
Delta int
|
||||
Reason string
|
||||
ProductID uuid.UUID
|
||||
OutletID uuid.UUID
|
||||
Delta int
|
||||
Reason string
|
||||
}
|
||||
|
||||
type InventoryResponse struct {
|
||||
@@ -58,3 +60,61 @@ func (i *Inventory) AdjustQuantity(delta int) int {
|
||||
}
|
||||
return newQuantity
|
||||
}
|
||||
|
||||
// Inventory Report Models
|
||||
type InventoryReportSummary struct {
|
||||
TotalProducts int `json:"total_products"`
|
||||
TotalIngredients int `json:"total_ingredients"`
|
||||
TotalValue float64 `json:"total_value"`
|
||||
LowStockProducts int `json:"low_stock_products"`
|
||||
LowStockIngredients int `json:"low_stock_ingredients"`
|
||||
ZeroStockProducts int `json:"zero_stock_products"`
|
||||
ZeroStockIngredients int `json:"zero_stock_ingredients"`
|
||||
OutletID uuid.UUID `json:"outlet_id"`
|
||||
OutletName string `json:"outlet_name"`
|
||||
GeneratedAt time.Time `json:"generated_at"`
|
||||
}
|
||||
|
||||
type InventoryReportDetail struct {
|
||||
Summary *InventoryReportSummary `json:"summary"`
|
||||
Products []*InventoryProductDetail `json:"products"`
|
||||
Ingredients []*InventoryIngredientDetail `json:"ingredients"`
|
||||
}
|
||||
|
||||
type InventoryProductDetail struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
ProductID uuid.UUID `json:"product_id"`
|
||||
ProductName string `json:"product_name"`
|
||||
CategoryName string `json:"category_name"`
|
||||
Quantity int `json:"quantity"`
|
||||
ReorderLevel int `json:"reorder_level"`
|
||||
UnitCost float64 `json:"unit_cost"`
|
||||
TotalValue float64 `json:"total_value"`
|
||||
IsLowStock bool `json:"is_low_stock"`
|
||||
IsZeroStock bool `json:"is_zero_stock"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
type InventoryIngredientDetail struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
IngredientID uuid.UUID `json:"ingredient_id"`
|
||||
IngredientName string `json:"ingredient_name"`
|
||||
UnitName string `json:"unit_name"`
|
||||
Quantity int `json:"quantity"`
|
||||
ReorderLevel int `json:"reorder_level"`
|
||||
UnitCost float64 `json:"unit_cost"`
|
||||
TotalValue float64 `json:"total_value"`
|
||||
IsLowStock bool `json:"is_low_stock"`
|
||||
IsZeroStock bool `json:"is_zero_stock"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
type InventoryReportFilter struct {
|
||||
OutletID *uuid.UUID `json:"outlet_id"`
|
||||
CategoryID *uuid.UUID `json:"category_id"`
|
||||
ShowLowStock *bool `json:"show_low_stock"`
|
||||
ShowZeroStock *bool `json:"show_zero_stock"`
|
||||
Search *string `json:"search"`
|
||||
Limit *int `json:"limit"`
|
||||
Offset *int `json:"offset"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user