o
    i                     @   s   d dl mZ d dlmZ ddlT ddlT d dlT ddlT ddlT G dd dej	Z
G dd deejZG d	d
 d
eejZG dd dejZG dd dejZG dd dejZG dd dejZG dd dejZG dd dejZdS )    )generics)JsonResponse   )*c                   @   s   e Zd Zg Zdd ZdS )SendNotificationMobilec           	      O   sh   |j }d|v r,|d }|d }|d }|d }|dkr"t||| n
|dkr,t||| tdi idd	S )
NdeviceTokentitlebodydeviceOSTypeandroidiosdataF)safe)r   send_push_notification_androidsend_push_notification_iosr   )	selfrequestargskwargsr   r   r   r	   r
    r   _/var/www/snowflake_co_dev_github/snow_flake_back_end_deploy/mama_care_api/notification/views.pypost   s   zSendNotificationMobile.postN)__name__
__module____qualname__querysetr   r   r   r   r   r      s    r   c                   @   s:   e Zd ZeegZegZddgZe	Z
ej dZeZdS )UserDeviceListMobileViewparentIddeviceOSTypeId-idN)r   r   r   APIKeyAuthenticationMobileTokenAuthenticationauthentication_classesDjangoFilterBackendfilter_backendsfilterset_fieldsStandardSetPaginationpagination_class
UserDeviceobjectsallorder_byr   UserDeviceSerializerserializer_classr   r   r   r   r      s    r   c                   @   s2   e Zd ZeegZegZdZe	j
 dZeZdS )UserDeviceDetailMobileViewidr   N)r   r   r   r    r!   r"   r#   r$   lookup_fieldr(   r)   r*   r+   r   r,   r-   r   r   r   r   r.   %   s    r.   c                   @   ,   e Zd ZeegZegZeZ	e
j ZeZdS )UserDeviceListDashboardViewN)r   r   r   r    DashboardTokenAuthenticationr"   r#   r$   r&   r'   r(   r)   r*   r   r,   r-   r   r   r   r   r2   ,       
r2   c                   @   ,   e Zd ZeegZegZdZe	j
 ZeZdS )UserDeviceDetailDashboardViewr/   N)r   r   r   r    r3   r"   r#   r$   r0   r(   r)   r*   r   r,   r-   r   r   r   r   r6   3   r4   r6   c                   @   s2   e Zd ZeegZegZdgZe	Z
ej ZeZdS )NotificationListMobileViewuserDeviceIdN)r   r   r   r    r!   r"   r#   r$   r%   r&   r'   Notificationr)   r*   r   NotificationSerializerr-   r   r   r   r   r7   <   s    
r7   c                   @   r5   )NotificationDetailMobileViewr/   N)r   r   r   r    r!   r"   r#   r$   r0   r9   r)   r*   r   r:   r-   r   r   r   r   r;   D   r4   r;   c                   @   r1   )NotificationListDashboardViewN)r   r   r   r    r3   r"   r#   r$   r&   r'   r9   r)   r*   r   r:   r-   r   r   r   r   r<   K   r4   r<   c                   @   r5   )NotificationDetailDashboardViewr/   N)r   r   r   r    r3   r"   r#   r$   r0   r9   r)   r*   r   r:   r-   r   r   r   r   r=   R   r4   r=   N)rest_frameworkr   django.httpr   apnsfcmcommon.viewsmodelsserializersGenericAPIViewr   SubscriptionPlanMixinListCreateAPIViewr   RetrieveUpdateDestroyAPIViewr.   r2   r6   ListAPIViewr7   UpdateAPIViewr;   r<   r=   r   r   r   r   <module>   s     	