Fix new services implementation 3
This commit is contained in:
@@ -22,7 +22,8 @@ class AlertType(str, Enum):
|
||||
|
||||
class ForecastRequest(BaseModel):
|
||||
"""Request schema for generating forecasts"""
|
||||
product_name: str = Field(..., description="Product name")
|
||||
inventory_product_id: str = Field(..., description="Inventory product UUID reference")
|
||||
# product_name: str = Field(..., description="Product name") # DEPRECATED - use inventory_product_id
|
||||
forecast_date: date = Field(..., description="Starting date for forecast")
|
||||
forecast_days: int = Field(1, ge=1, le=30, description="Number of days to forecast")
|
||||
location: str = Field(..., description="Location identifier")
|
||||
@@ -40,14 +41,15 @@ class BatchForecastRequest(BaseModel):
|
||||
"""Request schema for batch forecasting"""
|
||||
tenant_id: str = Field(..., description="Tenant ID")
|
||||
batch_name: str = Field(..., description="Batch name for tracking")
|
||||
products: List[str] = Field(..., description="List of product names")
|
||||
inventory_product_ids: List[str] = Field(..., description="List of inventory product IDs")
|
||||
forecast_days: int = Field(7, ge=1, le=30, description="Number of days to forecast")
|
||||
|
||||
class ForecastResponse(BaseModel):
|
||||
"""Response schema for forecast results"""
|
||||
id: str
|
||||
tenant_id: str
|
||||
product_name: str
|
||||
inventory_product_id: str # Reference to inventory service
|
||||
# product_name: str # Can be fetched from inventory service if needed for display
|
||||
location: str
|
||||
forecast_date: datetime
|
||||
|
||||
|
||||
Reference in New Issue
Block a user