o
    6k~i8                     @   s   d dl mZ d dlmZ ddlmZmZmZm	Z	 e
eG dd dejZe
eG dd dejZe
eG d	d
 d
ejZe
e	G dd dejZdS )    )admin)gettext_lazy   )GovernorateCategoryAmenityPlacec                   @   s&   e Zd ZdZg dZg dZdgZdS )GovernorateAdminzGovernorate Admin)name_arname_kuname_encoder
   N__name__
__module____qualname____doc__list_displaysearch_fieldsordering r   r   1/var/www/newdalilibackend/backend/places/admin.pyr	      
    
r	   c                   @   s4   e Zd ZdZg dZdgZg dZddiZdgZdS )	CategoryAdminzCategory Admin)r
   r   r   slug	is_activer   )r
   r   r   r   r   )r
   r
   N)	r   r   r   r   r   list_filterr   prepopulated_fieldsr   r   r   r   r   r      s    
r   c                   @   s&   e Zd ZdZg dZg dZdgZdS )AmenityAdminzAmenity Admin)r
   r   r   icon)r
   r   r   r
   Nr   r   r   r   r   r      r   r   c                	   @   s  e Zd ZdZg dZg dZg dZg dZdgZg dZ	e
dd	d
ife
dd	dife
dd	dife
dd	dife
dd	dife
dd	dife
dd	diffZddiZdgZg dZdd Ze
de_dd Ze
d e_d!d" Ze
d#e_d$d% Ze
d&e_d'S )(
PlaceAdminzPlace Admin)	namecategorygovernorateownerratingreviews_countis_verifiedr   
created_at)r"   r#   r'   r   has_bookingis_open)r!   addressowner__usernameowner__email)r$   r"   r#   	amenities)r%   r&   r(   
updated_atzBasic Informationfields)r!   r   r"   r#   r$   descriptionLocation)r+   latitude	longitudeContact)phonewebsiteemailMedia)imagegalleryDetails)working_hoursr.   price_ranger*   r)   Status)r'   r   r%   r&   
Timestamps)r(   r/   r   )r!   z-created_at)verify_placesunverify_placesactivate_placesdeactivate_placesc                 C      |j dd d S )NTr'   updateselfrequestquerysetr   r   r   rA   E      zPlaceAdmin.verify_placeszVerify selected placesc                 C   rE   )NFrF   rG   rI   r   r   r   rB   I   rM   zPlaceAdmin.unverify_placeszUnverify selected placesc                 C   rE   )NTr   rG   rI   r   r   r   rC   M   rM   zPlaceAdmin.activate_placeszActivate selected placesc                 C   rE   )NFrN   rG   rI   r   r   r   rD   Q   rM   zPlaceAdmin.deactivate_placeszDeactivate selected placesN)r   r   r   r   r   r   r   raw_id_fieldsfilter_horizontalreadonly_fields_	fieldsetsr   r   actionsrA   short_descriptionrB   rC   rD   r   r   r   r   r        sR    


r    N)django.contribr   django.utils.translationr   rR   modelsr   r   r   r   register
ModelAdminr	   r   r   r    r   r   r   r   <module>   s    	