o
    ȟ1i                     @   sN  d dl mZmZ d dlmZmZ d dlmZ d dlm	Z	m
Z
 d dlmZ eddZejdeeed	gd
eeeefde	defddZejdedeeeefddZejdedeeeefdefddZejdeeed	gd
eeeefdede
fddZejdeeed	gd
eeeefdefddZdS )    )	APIRouterDepends)get_userrequire_role)GenericResponse)TimeSlotCreateSchemaTimeSlotUpdateSchema)TimeSlotServicez
/time_slot)prefix/admin)response_modeldependenciesrequestservicec                    s   | | }ddiS )NmessagezTime slot added)Zcreate_new_time_slot)r   userr   Znew_slot r   /app/api/time_slot.pyadd_new_time_slot      
r   )r   c                    s   d|  dS )Nz!Time slot populated successfully.r   data)Zfetch_all_time_slot)r   r   r   r   r   list_all_time_slot   s   r   z/{time_slot_id}time_slot_idc                    s   d| | dS )Nz"Time slot  populated successfully.r   )Zfetch_time_slot_detailsr   r   r   r   r   r   time_slot_details   s   r   c                    s   | | | ddiS )Nr   z Time slot  updated successfully.)update_time_slot)r   r   r   r   r   r   r   r      s   r   c                    s   | |  ddiS )Nr   zTime slot deleted successfully.)delete_time_slotr   r   r   r   r   #   r   r   N)fastapir   r   core.security.authenticationr   r   schemar   Zschema.time_slotr   r   Zservices.time_slotr	   time_slot_routerpostr   getr   intr   putr   deleter   r   r   r   r   <module>   s0    
"