a
    d=f                     @   s   d dl mZ d dlmZ d dlT d dlmZ d dlmZ d dlm	Z	 d dl
mZmZ d dl
mZ d d	lmZ G d
d deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd deZdS )    )SerializerMethodField)ModelSerializer)*)serializers)filters)PageNumberPagination)FQ)Sum)Base64ImageFieldc                   @   s,   e Zd ZejdddddZG dd dZdS )UserUpdateSerializer   Fz4 digit number pin code)
max_length
min_lengthrequired	help_textc                   @   s   e Zd ZeZdZdZdS )zUserUpdateSerializer.Metaselltix_user)id
first_name	last_namephoneNumberpinCodecryptoAcceptedmaticAcceptedusdtAcceptedusdcAccepted
cbAcceptedorganizerCompanyorganizeWebsite
webhookUrlcountrytimezoneN)__name__
__module____qualname__Usermodelref_namefields r)   r)   /Users/christophesurbier/Dropbox/Mon Mac (MacBook-Air-de-christophe.local)/Documents/Programmation/SellTix/tixsellbackend/api_partner/serializers.pyMeta   s   r+   N)r"   r#   r$   r   	CharFieldr   r+   r)   r)   r)   r*   r      s   r   c                   @   s   e Zd ZG dd dZdS )UserReadSerializerc                   @   s    e Zd ZeZdZdZg dZdS )zUserReadSerializer.Metar   )isOrganizergeneratedWalletpassword
last_logintransactionHashsignInTokenstripeCustomerIdaccountLockedappleGoogleWalletqrcodeTimeout	maticSentgroupsuser_permissions
privateKeywords	publicKeyr   is_staffis_superuser	is_activelastLoginCodelastLoginCodeDatenonce)r>   r?   r@   r:   N)r"   r#   r$   r%   r&   r'   excluderead_only_fieldsr)   r)   r)   r*   r+      s   r+   Nr"   r#   r$   r+   r)   r)   r)   r*   r-      s   r-   c                   @   s$   e Zd ZeddZG dd dZdS )EventsForCreateCustomSerializerFr   c                   @   s   e Zd ZeZdZdS )z$EventsForCreateCustomSerializer.MetarefOrganiserstatusrefEventPageTemplate	eventTyper2   slug	venueNamevenueAddressvenueGeolocpreviewVideo
webHookSet	entryTimesellTixRoyaltieValuer6   r7   streamingQualityrecordStreamingrecordedFilemailRappelSentstreamingIdrecordedStreamingUrleventContractticketContractpaymentContractticketTypeContractNr"   r#   r$   Eventr&   rD   r)   r)   r)   r*   r+      s   r+   Nr"   r#   r$   r   imager+   r)   r)   r)   r*   rG      s   
rG   c                   @   s*   e Zd Ze ZG dd dZdd ZdS )EventsCustomSerializerc                   @   s   e Zd ZeZdZdZdS )zEventsCustomSerializer.MetarI   )rK   N)r"   r#   r$   ra   r&   rD   	read_onlyr)   r)   r)   r*   r+   +   s   r+   c                 C   s
   d|j  S Nzhttps://www.selltix.live/event/rN   selfobjr)   r)   r*   get_sellTixEventPage3   s    z+EventsCustomSerializer.get_sellTixEventPageNr"   r#   r$   r   r   sellTixEventPager+   rk   r)   r)   r)   r*   rd   )   s   rd   c                   @   s*   e Zd Ze ZG dd dZdd ZdS )EventsForGetSerializerc                   @   s   e Zd ZeZdZdS )zEventsForGetSerializer.Meta)rJ   rL   rM   r2   rN   rO   rP   rQ   rR   rS   rT   rU   r6   r7   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   Nr`   r)   r)   r)   r*   r+   @   s   r+   c                 C   s
   d|j  S rf   rg   rh   r)   r)   r*   rk   G   s    z+EventsForGetSerializer.get_sellTixEventPageNrl   r)   r)   r)   r*   rn   >   s   rn   c                   @   s$   e Zd ZeddZG dd dZdS )TicketTypeSerializerForCreateFrH   c                   @   s   e Zd ZeZdZdS )z"TicketTypeSerializerForCreate.Meta)refEventrc   name
maxTicketsmaxTicketsPerUserticketPricebookingStartDatebookingEndDatedescriptionrevealedrevealStartDate	hiddenurisellablemaxSellablePriceroyaltySellableearlyBiddiscountPricediscountEndDate	canStreamNr"   r#   r$   
TicketTyper&   r(   r)   r)   r)   r*   r+   M   s   r+   Nrb   r)   r)   r)   r*   ro   K   s   
ro   c                   @   s   e Zd ZG dd dZdS )TicketTypeForReadSerializerc                   @   s   e Zd ZeZdZdS )z TicketTypeForReadSerializer.Meta)r   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   r   r   Nr   r)   r)   r)   r*   r+   T   s   r+   NrF   r)   r)   r)   r*   r   S   s   r   N)rest_framework.fieldsr   rest_framework.serializersr   backoffice.modelsrest_frameworkr   r   rest_framework.paginationr   django.db.modelsr   r	   r
   Zdrf_extra_fields.fieldsr   r   r-   rG   rd   rn   ro   r   r)   r)   r)   r*   <module>   s   	