o
    6k~iA                     @   sZ   d dl mZ ddlmZmZmZ G dd dejZG dd dejZG dd	 d	ejZ	d
S )    )serializers   )NotificationFavoriteActivityc                   @   s   e Zd ZdZG dd dZdS )NotificationSerializerzNotification Serializerc                   @       e Zd ZeZg dZddgZdS )zNotificationSerializer.Meta)idtypetitlemessagedatais_read
created_atr	   r   N)__name__
__module____qualname__r   modelfieldsread_only_fields r   r   >/var/www/newdalilibackend/backend/notifications/serializers.pyMeta       r   N)r   r   r   __doc__r   r   r   r   r   r      s    r   c                       s^   e Zd ZdZejdddZejddddZejdddd	d
Z	G dd dZ
 fddZ  ZS )FavoriteSerializerzFavorite Serializer
place.nameT)source	read_onlyzplace.image.urlr   r   
allow_nullzplace.rating      )r   r   
max_digitsdecimal_placesc                   @   r   )zFavoriteSerializer.Meta)r	   place
place_nameplace_imageplace_ratingr   r	   r   N)r   r   r   r   r   r   r   r   r   r   r   r      r   r   c                       | j d j|d< t |S Nrequestusercontextr,   supercreateselfvalidated_data	__class__r   r   r0         zFavoriteSerializer.create)r   r   r   r   r   	CharFieldr&   r'   DecimalFieldr(   r   r0   __classcell__r   r   r4   r   r      s    r   c                       s>   e Zd ZdZejddddZG dd dZ fddZ  Z	S )	ActivitySerializerzActivity Serializerr   Tr   c                   @   r   )zActivitySerializer.Meta)r	   r
   r%   r&   descriptionmetadatar   r	   r   N)r   r   r   r   r   r   r   r   r   r   r   r   !   r   r   c                    r)   r*   r-   r1   r4   r   r   r0   &   r6   zActivitySerializer.create)
r   r   r   r   r   r7   r&   r   r0   r9   r   r   r4   r   r:      s
    r:   N)
rest_frameworkr   modelsr   r   r   ModelSerializerr   r   r:   r   r   r   r   <module>   s
    