o
    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                   @      e Zd ZdgZdS )zProduct.Metaproduct_nameNr   r   r   orderingr   r   r   r   r   &       
r   c                 C      | j S N)product_codeselfr   r   r   __str__)      zProduct.__str__c                 C      t dd| jidS )NZproduct_detailpkkwargsr   r;   r6   r   r   r   get_absolute_url,      zProduct.get_absolute_urlN)r   r   r   r   r!   r5   r/   
ImageFieldZproduct_image	TextFieldZproduct_description	DateFieldZproduct_publicationdate	FileFieldZproduct_filer   r8   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                   @   r.   )z	Tool.Meta	tool_codeNr0   r   r   r   r   r   9   r2   r   c                 C   r3   r4   )	tool_namer6   r   r   r   r8   <   r9   zTool.__str__c                 C   r:   )NZtool_detailr;   r<   r>   r6   r   r   r   r?   ?   r@   zTool.get_absolute_urlN)r   r   r   r   r!   rF   rA   Z
tool_imagerB   Ztool_descriptionrG   rC   Ztool_publicationdaterD   Z	tool_filer   r8   r?   r   r   r   r   rE   0   s    rE   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)rI   r   r      )pdfZPDF)vu   VidéorL   )r   r   r   zdocumentations/r-   c                   @   r.   )zDocumentation.Metadocumentation_publicationdateNr0   r   r   r   r   r   O   r2   r   c                 C   s   | j  d| jj d| j S )Nz for z
 version :)documentation_typeproductr/   documentation_versionr6   r   r   r   r8   R   s   zDocumentation.__str__c                 C   r:   )N_detailr;   r<   r>   r6   r   r   r   r?   U   r@   zDocumentation.get_absolute_urlN)r   r   r   r   r!   Zdocumentation_coderQ   rC   rN   
ForeignKeyr$   CASCADErP   rE   ZtoolrO   rD   Zdocumentation_filer   r8   r?   r   r   r   r   rH   C   s"    

rH   N)	django.dbr   django.urlsr   django.utilsr   django.utils.translationr   r   r"   ZTYPE_CATEGORYZTYPE_COVERAGEZTYPE_OPERATIONModelr   r$   rE   rH   r   r   r   r   <module>   s    