o
    Uh                     @   sJ  d Z ddlmZ 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 ddl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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dS ) zSimulation router.    )List)	APIRouterDepends)Session)service)GroupResponse)get_db)JWTPayloadSchemaget_current_user   )SimulationCreateSimulationResponsez/simulationT)response_model_exclude_nonerequestdbtokenc                    s   t ||| I dH S )zRegister the simulation.N)r   SimulationServicecreate_simulation)r   r   r    r   4/var/www/html/RetailAPI/app/api/simulation/router.pyr      s   r   z/simulation/{simulation_id})response_modelr   simulation_idc                       t ||| I d H S N)r   r   get_simulationr   r   r   r   r   r   r         r   z"/simulation/{simulation_id}/groupssimulation_codec                    s   t ||| S r   )r   r   get_groups_by_simulation_id)r   r   r   r   r   r   r      s   r   z"/simulation/delete/{simulation_id}c                    r   r   )r   r   delete_simulationr   r   r   r   r      r   r   N)__doc__typingr   fastapir   r   sqlalchemy.ormr   app.api.simulationr   app.api.student.schemasr   app.database.main.mysqlr   app.dependency.authanticationr	   r
   schemasr   r   simulation_routerpostr   getintr   strr   deleter   r   r   r   r   <module>   s$    &&&*