o
    Uh
                     @   s  d dl mZmZ d dlmZ d dlmZ d dlmZ ddl	m
Z
mZmZmZ d dlmZmZ e Zejdd	d
eeeefdededefddZejde
deeeefdededefddZejded	deeeefdededefddZejdee d	deeeefdededefddZejdd	d
eeeefdededefddZejd d	d
eeeefdededefd!d"Zd#S )$    )	APIRouterDepends)Session)service)get_db   )TotalConsumptionResponsecustomer_location_creatcustomerLocationResponsecustomerLocationUpdate)JWTPayloadSchemaget_current_studentz/customer_locationT)response_model_exclude_nonerequestdbtokenc                       t ||| I d H S N)r   Customer_locationcreate_customer_locationr   r   r    r   ;/var/www/html/RetailAPI/app/api/customer_location/router.pycreate_customer_locatio
      r   z5/customer_location/group/{group_id}/total_consumption)response_modelgroup_idc                    r   r   )r   r   get_total_potential_by_groupr   r   r   r   r   r   get_total_consumption_by_group   r   r   z-/customer_location/get/{customer_location_id})r   r   customer_location_idc                    r   r   )r   r   get_customer_locationr    r   r   r   r   r   get_simulation   r   r#   z#/customer_location/group/{group_id}c                    r   r   )r   r   get_customer_locations_by_groupr   r   r   r   r$      r   r$   z/customer_location/updatec                    r   r   )r   r   update_customer_locationr   r   r   r   update_segment   r   r&   z0/customer_location/delete/{customer_location_id}c                    r   r   )r   r   delete_customer_locationr"   r   r   r   delete_catchment   r   r(   N)fastapir   r   sqlalchemy.ormr   app.api.customer_locationr   app.database.main.mysqlr   schemasr   r	   r
   r   app.dependency.authanticationr   r   customer_location_routerpostr   getintr   r#   listr$   putr&   deleter(   r   r   r   r   <module>   s&    &&&&&*