
    DjL                        d Z ddlm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dS )z2Pydantic v2 response models for all API endpoints.    )annotations)Optional)	BaseModelc                  l    e Zd ZU ded<   ded<   dZded<   dZded	<   ded
<   ded<   dZded<   ded<   dS )BondRiskOutfloatcomposite_scorestrcomposite_gradeNOptional[float]rating_scoreOptional[str]rating_gradespread_scorespread_used
spread_bpsboolis_investment_grade)__name__
__module____qualname____annotations__r   r   r        /app/app/models/schemas.pyr   r   
   s         $(L(((("&L&&&&"&J&&&&r   r   c                  @   e Zd ZU dZded<   dZded<   dZded<   dZded<   dZded<   dZ	ded	<   dZ
ded
<   dZded<   dZded<   dZded<   dZded<   dZded<   dZded<   dZded<   dZded<   dZded<   dZded<   dZded<   dZded<   dZded<   dZded<   ded<   dS )LsegBondOutNr   isinricnameissuerr   couponmaturity_date
issue_datecoupon_freqcoupon_typerating_moodyscurrencypriceytmytwz_spreadoasasset_swap_spreadcountrytrbc_igtrbc_industrydurationr   risk)r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r   r   r   r   r      s        DCD F    "F""""#'M'''' $J$$$$#'K''''!%K%%%%#'M''''"H""""!E!!!!CC $H$$$$C)-----!G!!!!!G!!!!#'M'''' $H$$$$r   r   c                  $    e Zd ZU ded<   ded<   dS )LsegBondListOutzlist[LsegBondOut]bondsintcountN)r   r   r   r   r   r   r   r5   r5   2   s%         JJJJJr   r5   c                  T    e Zd ZU ded<   dZded<   ded<   ded<   ded	<   dZded
<   dS )LsegPortfolioSummaryOutr7   total_bondsNr   avg_composite_scoredict[str, int]grade_distributioninvestment_grade_counthigh_yield_countavg_spread_bps)r   r   r   r   r<   rA   r   r   r   r:   r:   9   se         +/////&&&&&*N******r   r:   c                      e Zd ZU dZdZded<   dZded<   dZded<   dZded<   dZ	ded<   dZ
ded	<   dZded
<   dZded<   dS )PeerCurveUniverseOASzDAverage OAS (bps) for one maturity bucket across each peer universe.Nr   r!   rating_peerssector
sub_sectorrating_sectorrating_sub_sectorlower_rating_sub_sectorupper_rating_sub_sector)r   r   r   __doc__r!   r   rD   rE   rF   rG   rH   rI   rJ   r   r   r   rC   rC   D   s         NN"F""""$(L(((("F"""""&J&&&&%)M)))))-----/33333/3333333r   rC   c                      e Zd ZU ded<   dZded<   dZded<   dZded<   d	Zded
<   dZded<   g Z	ded<   dZ
ded<   dZded<   ded<   ded<   ded<   dZded<   dS )PeerCurveResponser
   r!   Nr   rE   rF   Sectorsector_labelzIndustry Groupsub_sector_labelrating_bucketz	list[str]rating_peer_bucketslower_rating_bucketupper_rating_bucketzdict[str, PeerCurveUniverseOAS]tabler=   bond_countsz
list[dict]
chart_datar,   spread_source)r   r   r   r   rE   rF   rO   rP   rQ   rR   rS   rT   rX   r   r   r   rM   rM   P   s         KKK F     $J$$$$ L    ,,,,,#'M''''%''''')-----)-----****#M######r   rM   N)rK   
__future__r   typingr   pydanticr   r   r   r5   r:   rC   rM   r   r   r   <module>r\      sG   8 8 " " " " " "            
    )       )   6    i   + + + + +i + + +	4 	4 	4 	4 	49 	4 	4 	4$ $ $ $ $	 $ $ $ $ $r   