B
    HDbP  ã               @   s”   d dl mZ d dlmZ d dlm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 )é    )Úserializers)ÚLocation)Úutil_serializersc               @   s   e Zd ZG dd„ dƒZdS )ÚParentLocationSerializerc               @   s   e Zd ZeZddddgZdS )zParentLocationSerializer.MetaÚidÚlocation_codeÚlocation_nameÚparent_locationN)Ú__name__Ú
__module__Ú__qualname__r   ÚmodelÚfields© r   r   úNG:\easytimepro\master/mysite/personnel\api\serializers\location_serializers.pyÚMeta   s   r   N)r
   r   r   r   r   r   r   r   r      s   r   c               @   s(   e Zd Zeƒ Ze ¡ ZG dd„ dƒZdS )ÚLocationSerializerc               @   s   e Zd ZeZdddddgZdS )zLocationSerializer.Metar   r   r   r	   ÚcompanyN)r
   r   r   r   r   r   r   r   r   r   r      s   r   N)	r
   r   r   r   r	   r   ZCompanyNameSerializerr   r   r   r   r   r   r      s   r   c               @   s   e Zd ZG dd„ dƒZdS )ÚLocationExportSerializerc               @   s   e Zd ZeZddddgZdS )zLocationExportSerializer.Metar   r   r   r	   N)r
   r   r   r   r   r   r   r   r   r   r      s   r   N)r
   r   r   r   r   r   r   r   r      s   r   c               @   s   e Zd ZG dd„ dƒZdS )ÚLocationCreateSerializerc               @   s   e Zd ZeZddddgZdS )zLocationCreateSerializer.Metar   r   r   r	   N)r
   r   r   r   r   r   r   r   r   r   r       s   r   N)r
   r   r   r   r   r   r   r   r      s   r   c               @   s   e Zd ZG dd„ dƒZdS )ÚLocationEditSerializerc               @   s2   e Zd ZeZddddgZdddœdddœdœZdS )	zLocationEditSerializer.Metar   r   r   r	   F)ÚrequiredZ
allow_null)r   r   N)r
   r   r   r   r   r   Zextra_kwargsr   r   r   r   r   &   s   r   N)r
   r   r   r   r   r   r   r   r   %   s   r   c               @   s   e Zd ZG dd„ dƒZdS )ÚLocationActionSerializerc               @   s   e Zd ZeZdZdS )zLocationActionSerializer.Meta))Údeleter   N)r
   r   r   r   r   Zaction_type_choicesr   r   r   r   r   0   s   r   N)r
   r   r   r   r   r   r   r   r   /   s   r   N)Zrest_frameworkr   Z&mysite.personnel.models.model_locationr   Z mysite.personnel.api.serializersr   ZModelSerializerr   r   r   r   r   ZObjectActionSerializerr   r   r   r   r   Ú<module>   s   

