U
    qaH                     @   s   d dl mZ d dlmZ d dlmZ d dlmZ ddgZ	ddgZ
d	d
gZddgZG dd dejZG dd deZG dd deZG dd deZdS )    )models)reverse)timezone)ugettext_lazy)EZEnable)DZDisable)UUSER)RZRESSELER)WZ	Worldwide)NZNational)CZCredit)r   ZDebitc                   @   s   e Zd ZejddeddZejddeddZeje	j
ddeddZeje	j
ddeddZejded	ed
dZG dd dZdS )
CommonInfoTu	   Crée par)nullblankverbose_nameu   Modifié paru   Crée le)defaultr   r   r   u   Modifié le   r   ZEtat)
max_lengthchoicesr   r   c                   @   s   e Zd ZdZdS )zCommonInfo.MetaTN)__name__
__module____qualname__abstract r   r   +/var/www/html/InfoLabSite/product/models.pyMeta   s   r   N)r   r   r   r   IntegerField_Z	createdByZeditedByDateTimeFieldr   nowZ	createdOnZeditedOn	CharFieldRECORD_STATEstater   r   r   r   r   r      s:                r   c                   @   sr   e Zd ZejdddZejddZejdddZej	dd	Z
e Zejd
dZG dd dZdd Zdd ZdS )Product   Tr   uniqued   r   zproducts/logo/default.pngzproducts/logor   	upload_tor   z	products/r+   c                   @   s   e Zd ZdgZdS )zProduct.Metaproduct_nameNr   r   r   orderingr   r   r   r   r   &   s   r   c                 C   s   | j S N)product_codeselfr   r   r   __str__)   s    zProduct.__str__c                 C   s   t dd| jidS )NZproduct_detailpkkwargsr   r6   r3   r   r   r   get_absolute_url,   s    zProduct.get_absolute_urlN)r   r   r   r   r!   r2   r.   
ImageFieldZproduct_image	TextFieldZproduct_description	DateFieldZproduct_publicationdate	FileFieldZproduct_filer   r5   r:   r   r   r   r   r$      s    r$   c                   @   sr   e Zd ZejdddZejdddZejddZ	ejdd	Z
e Zejd
dZG dd dZdd Zdd ZdS )Toolr%   Tr&   ztools/logo/default.pngz	tool/logor*   r,   r(   r)   ztools/r-   c                   @   s   e Zd ZdgZdS )z	Tool.Meta	tool_codeNr/   r   r   r   r   r   9   s   r   c                 C   s   | j S r1   )	tool_namer3   r   r   r   r5   <   s    zTool.__str__c                 C   s   t dd| jidS )NZtool_detailr6   r7   r9   r3   r   r   r   r:   ?   s    zTool.get_absolute_urlN)r   r   r   r   r!   r@   r;   Z
tool_imager<   Ztool_descriptionrA   r=   Ztool_publicationdater>   Z	tool_filer   r5   r:   r   r   r   r   r?   0   s    r?   c                   @   s   e Zd ZejdddZejddZe Zej	e
ejddddZej	eejdddZejdd	d
gddZejddZG dd dZdd Zdd ZdS )Documentationr%   Tr&   r)   Zproduct_documentations)	on_deleter   r   related_name)rC   r   r      )pdfZPDF)vu   VidéorF   )r   r   r   zdocumentations/r-   c                   @   s   e Zd ZdgZdS )zDocumentation.Metadocumentation_publicationdateNr/   r   r   r   r   r   O   s   r   c                 C   s   | j  d| jj d| j S )Nz for z
 version :)documentation_typeproductr.   documentation_versionr3   r   r   r   r5   R   s    zDocumentation.__str__c                 C   s   t dd| jidS )N_detailr6   r7   r9   r3   r   r   r   r:   U   s    zDocumentation.get_absolute_urlN)r   r   r   r   r!   Zdocumentation_coderK   r=   rH   
ForeignKeyr$   CASCADErJ   r?   ZtoolrI   r>   Zdocumentation_filer   r5   r:   r   r   r   r   rB   C   s2            rB   N)	django.dbr   django.urlsr   django.utilsr   django.utils.translationr   r   r"   ZTYPE_CATEGORYZTYPE_COVERAGEZTYPE_OPERATIONModelr   r$   r?   rB   r   r   r   r   <module>   s   