3
Ø€ŒhR  ã               @   sr  d dl mZmZmZmZmZmZmZ d dlmZm	Z	m
Z
 d dlZd dlZd dlZd dlZd dlZd dlmZ d dlmZ d dlmZ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! 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- d dl.m/Z/ d dl0m1Z1 d dl2m3Z3 d dl4m5Z5 d dl6T dd„ Z7ej8dƒdd„ ƒZ9dS )é    )ÚFlaskÚjsonifyÚrender_templateÚurl_forÚrequestÚredirectÚjson)ÚdatetimeÚ	timedeltaÚdateN)Úapp)Údb)ÚBookingTypeSeedÚBookingStatusSeedÚMandatoryPaymentsSeed)ÚBookingGuestTypesSeed)ÚBookingType)ÚBooking)ÚBookingGuest)ÚBookingStatus)ÚFacility)Ú	Inventory)ÚDetail)Ú	Mandatory)ÚTransaction)ÚGatepass)ÚGatepassGuest)ÚGatepassDetail)Ú	GuestType)ÚGatepassVehicle)ÚVehicle)Ú*c             C   s   | j jƒ  d S )N)ÚsessionÚclose)Úself© r%   ú2/booking_service/app/routes/bookings_count_urls.pyr#      s    r#   z/count/bookings/allc              C   s,   t jjtƒjtjd kƒjƒ } td| iƒdfS )NÚdataéÈ   )r   r"   Úqueryr   ÚfilterÚdeletion_markerÚcountr   )Úbookings_countr%   r%   r&   Úcount_all_bookings"   s    r.   ):Úflaskr   r   r   r   r   r   r   r	   r
   r   ÚpymysqlÚosÚmathÚrequestsÚuuidÚroutesr   r   Úroutes.seed_functionsr   r   r   r   Údatabase.booking_typesr   Údatabase.bookingsr   Údatabase.booking_guestsr   Údatabase.booking_statusr   Údatabase.facilityr   Údatabase.inventoryr   Údatabase.booking_detailsr   Údatabase.mandatory_paymentsr   Údatabase.transactionr   Údatabase.gatepassr   Údatabase.gatepass_guestsr   Údatabase.gatepass_detailsr   Údatabase.booking_guest_typesr   Údatabase.gatepass_vehiclesr   Údatabase.vehicler    Ú	variablesr#   Úrouter.   r%   r%   r%   r&   Ú<module>   s0   $(