o
    rh                     @   sN   d dl mZ d dlmZ d dlmZ ededZededZG dd dZdS )	    )TypeVar)	BaseModelDBModelType)bound
SchemaTypec                   @   sF   e Zd ZU dZee ed< dZee ed< e	dd Z
e	dd ZdS )
DataMapperNdb_modelschemac                 C   s   | j j|ddS )NT)from_attributes)r	   model_validateclsdata r   9/var/www/html/tgBotAssistant/bot/db/repos/mappers/base.pymap_to_domain_entity   s   zDataMapper.map_to_domain_entityc                 C   s   | j di | S )Nr   )r   
model_dumpr   r   r   r   map_to_persistence_entity   s   z$DataMapper.map_to_persistence_entity)__name__
__module____qualname__r   typer   __annotations__r	   r   classmethodr   r   r   r   r   r   r      s   
 
r   N)typingr   pydanticr   bot.db.baser   r   r   r   r   r   r   <module>   s    