a
    ¤Q•hl  ã                   @   s.   d dl mZ d dlmZ G dd„ dejƒZdS )é    )Úmodels)ÚUserc                   @   s°   e Zd Zg d¢Zejeejdddd�Ze 	¡ Z
ejdedd�Zejdd	�Zejdd
�Zejeddejd�Zejedddejd�Zejdd	�Zdd„ Zedd„ ƒZedd„ ƒZdS )ÚNotification))ÚinfoZInformativo)ÚalertZAlerta)Úerroru	   AtenÃ§Ã£oTÚnotifications)Ú	on_deleteÚnullÚblankÚrelated_nameé
   r   )Ú
max_lengthÚchoicesÚdefaultF)r   )Úauto_now_add)r
   r   r	   Zsent_notifications)r   r
   r   r	   c                 C   s   | j S )N)Úmessage©Úself© r   ú1/var/www/sistema_ama/apps/notifications/models.pyÚ__str__   s    zNotification.__str__c                 C   s   ddddœ  | jd¡S )Nzfa-info-circle text-infoz"fa-exclamation-circle text-warningzfa-times-circle text-danger©r   r   r   zfa-info-circle©ÚgetÚnotification_typer   r   r   r   Úicon   s    ýüzNotification.iconc                 C   s   ddddœ  | jd¡S )Nznotification-infoznotification-alertznotification-errorr   Ú r   r   r   r   r   Ú	css_class   s    ýüzNotification.css_classN)Ú__name__Ú
__module__Ú__qualname__ZTYPE_CHOICESr   Ú
ForeignKeyr   ÚCASCADEÚuserÚ	TextFieldr   Ú	CharFieldr   ÚBooleanFieldZis_readÚDateTimeFieldÚ
created_atÚ	recipientÚSET_NULLÚsenderZsend_to_allr   Úpropertyr   r   r   r   r   r   r      s   
r   N)Ú	django.dbr   Údjango.contrib.auth.modelsr   ÚModelr   r   r   r   r   Ú<module>   s   