B
    DDb
                 @   s   d dl mZ 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)TerminalCommand)util_serializers)Terminalc               @   s   e Zd ZG dd dZdS )TerminalSerializerc               @   s   e Zd ZeZdddgZdS )zTerminalSerializer.MetaidZsnaliasN)__name__
__module____qualname__r   modelfields r   r   SG:\easytimepro\master/mysite/iclock\api\serializers\terminal_command_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jdddZejdddZG dd dZ	dS )TerminalCommandSerializerzterminal.snT)source
allow_nullzterminal.aliasc            	   @   s&   e Zd ZeZddddddddd	g	Zd
S )zTerminalCommandSerializer.Metar   terminalterminal_snterminal_aliascontentcommit_timetransfer_timereturn_timereturn_valueN)r	   r
   r   r   r   r   r   r   r   r   r      s   r   N)
r	   r
   r   r   r   r   	CharFieldr   r   r   r   r   r   r   r      s   r   c               @   sT   e Zd ZejdddZejdddZe ZejdddZ	dd Z
G dd	 d	Zd
S )TerminalCommandExportSerializerzterminal.snT)r   r   zterminal.aliasZget_return_value_displayc             C   s2   |j }|j r.t|j dkr.d|j d d }|S )N   z{0}....)r   lenformat)selfobjr   r   r   r   get_get_content_display)   s    z7TerminalCommandExportSerializer.get_get_content_displayc            	   @   s&   e Zd ZeZddddddddd	g	Zd
S )z$TerminalCommandExportSerializer.Metar   r   r   r   r   r   r   r   get_content_displayN)r	   r
   r   r   r   r   r   r   r   r   r   /   s   r   N)r	   r
   r   r   r   r   r   ZSerializerMethodFieldr$   r   r#   r   r   r   r   r   r      s   r   c               @   s   e Zd ZG dd dZdS )TerminalCommandCreateSerializerc               @   s   e Zd ZeZddddgZdS )z$TerminalCommandCreateSerializer.Metar   r   r   r   N)r	   r
   r   r   r   r   r   r   r   r   r   8   s   r   N)r	   r
   r   r   r   r   r   r   r%   6   s   r%   c               @   s   e Zd ZG dd dZdS )TerminalCommandEditSerializerc               @   s0   e Zd ZeZddddgZddidddd	Zd
S )z"TerminalCommandEditSerializer.Metar   r   r   r   Z	read_onlyTF)requiredr   )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 )TerminalCommandActionSerializerc               @   s   e Zd ZeZdZdS )z$TerminalCommandActionSerializer.Meta))deleter)   N)r	   r
   r   r   r   Zaction_type_choicesr   r   r   r   r   J   s   r   N)r	   r
   r   r   r   r   r   r   r(   H   s   r(   N)Zrest_frameworkr   Z+mysite.iclock.models.model_terminal_commandr   Z mysite.personnel.api.serializersr   Z#mysite.iclock.models.model_terminalr   ZModelSerializerr   r   r   r%   r&   ZObjectActionSerializerr(   r   r   r   r   <module>   s   