Ë
    KµCj#  ã                   óü   — d Z ddlmZ ddlmZ  G d„ de«      Z G d„ de«      Z G d„ d	e«      Z G d
„ de«      Z G d„ de«      Z	 G d„ de«      Z
 G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Zy)uU  
Response schemas â€” the exact contract the client's frontend can rely on.

Every field is explicitly typed and Optional where a model can legitimately
have no answer (e.g. no SARIMAX model exists yet for a brand-new district).
This means the client gets a 200 with nulls in known places, never a
500 because a key was missing from a dict.
é    )ÚOptional)Ú	BaseModelc                   óR   — e Zd ZU dZee   ed<   dZee   ed<   dZeed<   dZ	e
ed<   y)ÚClimateOutputNÚforecast_rainfall_mmÚforecast_temp_cç        Úanomaly_scoreÚunknownÚanomaly_label)Ú__name__Ú
__module__Ú__qualname__r   r   ÚfloatÚ__annotations__r   r
   r   Ústr© ó    úAC:\Crop_Prediction\Backend\crop-ai-system\app\schemas\response.pyr   r      s3   … Ø,0Ð˜( 5™/Ó0Ø'+€O�X˜e‘_Ó+Ø€M�5ÓØ"€M�3Ô"r   r   c                   ó6   — e Zd ZU eed<   eed<   g Zee   ed<   y)ÚFeasibilityOutputÚlabelÚ
confidenceÚtop_factorsN)r   r   r   r   r   r   r   Úlistr   r   r   r   r      s   … ØƒJØÓØ€K��c‘Ôr   r   c                   ó4   — e Zd ZU eed<   dZeed<   dZeed<   y)ÚYieldOutputÚexpected_yield_ton_har	   Úuncertainty_ton_haztonnes per hectareÚunitN)r   r   r   r   r   r   r    r   r   r   r   r   r      s   … Ø Ó Ø #Ð˜Ó#Ø$€Dˆ#Ô$r   r   c                   ó6   — e Zd ZU eed<   dZee   ed<   eed<   y)ÚTrendOutputÚtrendNÚsloper   )r   r   r   r   r   r$   r   r   r   r   r   r"   r"   "   s   … ØƒJØ!€Eˆ8�E‰?Ó!ØÔr   r"   c                   ó6   — e Zd ZU eed<   eed<   dZee   ed<   y)ÚAlternativeCropÚcropÚscoreNÚreason)r   r   r   r   r   r   r)   r   r   r   r   r&   r&   (   s   … Ø
ƒIØƒLØ €FˆH�S‰MÔ r   r&   c                   ó   — e Zd ZU ee   ed<   y)ÚRecommendationOutputÚalternativesN)r   r   r   r   r&   r   r   r   r   r+   r+   .   s   … Ø�Ñ'Ô'r   r+   c                   ó>   — e Zd ZU dZee   ed<   dZeed<   dZ	eed<   y)ÚMarketOutputNÚprice_forecast_per_quintalr   Údemand_levelÚprice_volatility)
r   r   r   r/   r   r   r   r0   r   r1   r   r   r   r.   r.   2   s&   … Ø26Ð ¨¡Ó6Ø!€L�#Ó!Ø%Ð�cÔ%r   r.   c                   ó^   — e Zd ZU eed<   eed<   eed<   eed<   eed<   e	ed<   g Z
ee   ed<   y)	ÚModelOutputsÚclimateÚfeasibilityÚyield_predictionr#   ÚrecommendationÚmarketÚ	conflictsN)r   r   r   r   r   r   r   r"   r+   r.   r9   r   r   r   r   r   r3   r3   8   s4   … ØÓØ"Ó"Ø!Ó!ØÓØ(Ó(ØÓØ€Iˆt�C‰yÔr   r3   c                   óX   — e Zd ZU eed<   eed<   eed<   eed<   eed<   eed<   dZe	ed<   y	)
ÚCropAnalysisResultÚ
request_idÚinputÚmodelsÚexplanationÚmodel_versionÚprocessing_msFÚcachedN)
r   r   r   r   r   Údictr3   ÚintrB   Úboolr   r   r   r;   r;   B   s.   … ØƒOØƒKØÓØÓØÓØÓØ€FˆDÔr   r;   c                   ó0   — e Zd ZU dZeed<   eed<   eed<   y)ÚErrorResponseuK   Standard error shape returned for every 4xx/5xx â€” never a bare exception.Ú
error_codeÚmessager<   N)r   r   r   Ú__doc__r   r   r   r   r   rG   rG   L   s   … ÙUØƒOØƒLØ„Or   rG   N)rJ   Útypingr   Úpydanticr   r   r   r   r"   r&   r+   r.   r3   r;   rG   r   r   r   ú<module>rM      sŠ   ðñõ å ô#�Iô #ô ˜	ô  ô%�)ô %ô�)ô ô!�iô !ô(˜9ô (ô&�9ô &ô�9ô ô˜ô ô�Iõ r   