This commit is contained in:
2026-05-11 03:27:21 +03:30
parent cf7cbb937c
commit d0e68a1a56
854 changed files with 102985 additions and 76 deletions
@@ -0,0 +1,40 @@
from __future__ import annotations
from uuid import UUID
from pydantic import Field
from .common import ApiEnvelope, JsonObject, RouteContract, SchemaModel
HTTP_METHOD = 'GET'
ROUTE_PATH = '/api/crop-simulation/yield-harvest-summary/'
class CropSimulationYieldHarvestSummaryRequest(SchemaModel):
farm_uuid: UUID
season_year: int | None = None
crop_name: str | None = None
include_narrative: bool | None = None
class CropSimulationYieldHarvestSummaryResponseData(SchemaModel):
farm_uuid: str
season_highlights_card: JsonObject = Field(default_factory=dict)
yield_prediction: JsonObject = Field(default_factory=dict)
harvest_prediction_card: JsonObject = Field(default_factory=dict)
harvest_readiness_zones: JsonObject = Field(default_factory=dict)
yield_quality_bands: JsonObject = Field(default_factory=dict)
harvest_operations_card: JsonObject = Field(default_factory=dict)
yield_prediction_chart: JsonObject = Field(default_factory=dict)
class CropSimulationYieldHarvestSummaryResponse(ApiEnvelope[CropSimulationYieldHarvestSummaryResponseData]):
pass
CONTRACT = RouteContract(
method=HTTP_METHOD,
path=ROUTE_PATH,
request_model=CropSimulationYieldHarvestSummaryRequest.__name__,
response_model=CropSimulationYieldHarvestSummaryResponse.__name__,
)