Ë
    }9j9  ã                  ó¨   — d Z ddlmZ ddlZddlmZ ddlmZ ddlmZm	Z	m
Z
 dd„Z G d„ d	e«      Z G d
„ de«      Z G d„ de«      Z G d„ de«      Zy)zBData contracts for the pipeline. Field names are binding per spec.é    )ÚannotationsN)Údatetime)ÚLiteral)Ú	BaseModelÚFieldÚfield_validatorc                óL   — t        j                  dd| «      j                  «       S )z&Strip spaces, dots, dashes; uppercase.z[\s.\-/]Ú )ÚreÚsubÚupper)Úraws    ú?/var/www/html/agent.samochodowy/src/agent_samochodowy/models.pyÚnormalize_oer      s   € ä�6‰6�+˜r 3Ó'×-Ñ-Ó/Ð/ó    c                  óT   — e Zd ZU ded<   ded<   ded<   ded<   ded<   ded<   ded	<   y
)ÚPostÚstrÚpost_idÚgroupÚauthor_nameÚauthor_profile_urlÚtextr   Ú	timestampÚpost_urlN)Ú__name__Ú
__module__Ú__qualname__Ú__annotations__© r   r   r   r      s(   … ØƒLØƒJØÓØÓØ
ƒIØÓØ„Mr   r   c                  óî   — e Zd ZU ded<   ded<   ded<   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<    ee¬«      Zded<   dZded<    edd¬«      edd„«       «       Zy)ÚOfferr   Úoffer_idzLiteral['ebay', 'allegro']ÚplatformÚurlÚtitleNzfloat | NoneÚpriceÚPLNÚcurrencyé   ÚintÚqtyú
str | NoneÚbrandÚmodelÚcategoryÚengine_code©Údefault_factoryú	list[str]Ú
oe_numbersTÚboolÚis_partÚbefore©Úmodec                ó`   — |D �cg c]  }|j                  «       sŒt        |«      ‘Œ  c}S c c}w )N)Ústripr   )ÚclsÚvÚns      r   Únormalize_oe_numberszOffer.normalize_oe_numbers0   s$   € ð *+Ö8 A¨a¯g©g­i”˜Q•Ò8Ð8ùÒ8s   …+›+©r>   r4   Úreturnr4   )r   r   r   r   r'   r)   r,   r.   r/   r0   r1   r   Úlistr5   r7   r   Úclassmethodr@   r    r   r   r"   r"   !   s–   … ØƒMØ(Ó(Ø	ƒHØƒJØ€Eˆ<ÓØ€HˆcÓØ€CˆƒLØ€Eˆ:ÓØ€Eˆ:ÓØ€HˆjÓØ"€K�Ó"Ù!°$Ô7€J�	Ó7Ø€GˆTÓá�\¨Ô1Øò9ó ó 2ñ9r   r"   c                  ó¾   — e Zd ZU ded<   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<    e	e
¬«      Zded<   dZded<    edd¬«      edd„«       «       Zy)Ú	PartQueryr6   Úis_part_requestr   Úraw_textNr-   r.   r/   Úyearr0   r1   r2   r4   r5   r
   Úreasonr8   r9   c                ó�   — ddl m} g }|D ]8  }|j                  «       sŒt        |«      } ||«      sŒ(|j	                  |«       Œ: |S )Nr   )Úis_plausible_oe)Ú#agent_samochodowy.matcher.normalizerL   r<   r   Úappend)r=   r>   rL   Úresultr?   Ú
normalizeds         r   r@   zPartQuery.normalize_oe_numbersD   sL   € õ 	HàˆØò 	*ˆAØ—7‘7”9ØÜ% a›ˆJÙ˜zÕ*Ø—‘˜jÕ)ð	*ð ˆr   rA   )r   r   r   r   r.   r/   rI   r0   r1   r   rC   r5   rJ   r   rD   r@   r    r   r   rF   rF   9   sy   … ØÓØƒMØ€Eˆ:ÓØ€Eˆ:ÓØ€Dˆ*ÓØ€HˆjÓØ"€K�Ó"Ù!°$Ô7€J�	Ó7Ø€FˆCÓá�\¨Ô1Øò
ó ó 2ñ
r   rF   c                  ó`   — e Zd ZU  edd¬«      Zded<   ded<    ee¬«      Zd	ed
<   dZded<   y)ÚMatchResultg        g      ð?)ÚgeÚleÚfloatÚ
confidencez9Literal['oe', 'engine_code', 'atrybuty', 'fuzzy', 'brak']Úmethodr2   zlist[Offer]ÚoffersFr6   ÚmatchedN)	r   r   r   r   rV   r   rC   rX   rY   r    r   r   rR   rR   V   s2   … Ù ¨Ô-€J�Ó-ØEÓEÙ°Ô5€FˆKÓ5Ø€GˆTÔr   rR   )r   r   rB   r   )Ú__doc__Ú
__future__r   r   r   Útypingr   Úpydanticr   r   r   r   r   r"   rF   rR   r    r   r   ú<module>r^      sO   ðÙ Hå "ã 	Ý Ý ç 6Ñ 6ó0ôˆ9ô ô9ˆIô 9ô0�	ô ô:�)õ r   