
    Ehx                     f   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 d dlmZmZ  e       Zej'                  d	d
       ee       ee      fde
dedefd       Zej+                  dd
       ee       ee      fdededefd       Zej+                  d       ee       ee      fdededefd       Zej3                  dd
       ee       ee      fdeej4                     dedefd       Zej9                  dd
       ee       ee      fdededefd       Zy)    )List)	APIRouterDepends)Session)schemas)CivilCreate)CivilService)get_db)JWTPayloadSchemaget_current_userz/civilT)response_model_exclude_nonerequestdbtokenc                 T   K   t        ||      j                  |        d {   S 7 wN)r	   create_civilr   r   r   s      ;/var/www/html/retail-simulation-api/app/api/civil/router.pycreate_civil_entryr      s$     b%(55g>>>>   (&(z/civil/{group_id}group_idc                 T   K   t        ||      j                  |        d {   S 7 wr   )r	   get_civil_by_group_idr   r   r   s      r   get_civil_entryr      s$     b%(>>xHHHHr   z/subtotal/{group_id}c                 8    t        ||      j                  |       S r   )r	   get_subtotal_by_store_formatr   s      r   subtotalr      s    E"??II    z/update_civilc                 T   K   t        ||      j                  |        d {   S 7 wr   )r	   updater   s      r   update_civilr#      s$     b'..w7777r   z/delete_civilcivil_idc                 T   K   t        ||      j                  |        d {   S 7 wr   )r	   delete)r$   r   r   s      r   delete_civilr'      s$     b'..x8888r   N)typingr   fastapir   r   sqlalchemy.ormr   app.api.civilr   app.api.civil.schemasr   app.api.civil.servicer	   app.database.main.mysqlr
   app.dependency.authanticationr   r   civil_routerpostr   getintr   r   putCivilUpdater#   r&   r'    r    r   <module>r7      s    & " ! - . * L{8>@Gjq  sC  kD ?k ?g ?Wg ? ?? %4H6=fo`ghx`y IC IG IM] I II ()*1&/T[\lTm Js J JAQ J *J /tDGNvqx  zJ  rK 8tG$7$78 8W 8^n 8 E8 _$G29&/\cdt\u 9 9 9IY 9 H9r    