fix UI 1
This commit is contained in:
@@ -366,6 +366,30 @@ class StockResponse(InventoryBaseSchema):
|
||||
ingredient: Optional[IngredientResponse] = None
|
||||
|
||||
|
||||
# ===== BULK STOCK SCHEMAS =====
|
||||
|
||||
class BulkStockCreate(InventoryBaseSchema):
|
||||
"""Schema for bulk creating stock entries"""
|
||||
stocks: List[StockCreate] = Field(..., description="List of stock entries to create")
|
||||
|
||||
|
||||
class BulkStockResult(InventoryBaseSchema):
|
||||
"""Schema for individual result in bulk stock operation"""
|
||||
index: int = Field(..., description="Index of the stock in the original request")
|
||||
success: bool = Field(..., description="Whether the creation succeeded")
|
||||
stock: Optional[StockResponse] = Field(None, description="Created stock (if successful)")
|
||||
error: Optional[str] = Field(None, description="Error message (if failed)")
|
||||
|
||||
|
||||
class BulkStockResponse(InventoryBaseSchema):
|
||||
"""Schema for bulk stock creation response"""
|
||||
total_requested: int = Field(..., description="Total number of stock entries requested")
|
||||
total_created: int = Field(..., description="Number of stock entries successfully created")
|
||||
total_failed: int = Field(..., description="Number of stock entries that failed")
|
||||
results: List[BulkStockResult] = Field(..., description="Detailed results for each stock entry")
|
||||
transaction_id: str = Field(..., description="Transaction ID for audit trail")
|
||||
|
||||
|
||||
# ===== STOCK MOVEMENT SCHEMAS =====
|
||||
|
||||
class StockMovementCreate(InventoryBaseSchema):
|
||||
|
||||
Reference in New Issue
Block a user