Sindbad~EG File Manager
�
y�-g� � �� � d dl mZmZmZmZmZmZmZmZm Z d dl
mZmZ d dl m
Z
mZ d dlmZ d dlZ eej d ddd �
� � Z eej d ddd �
� � Z G d� d
� � ZdS )� ) �
create_engine�MetaData�Table�insert�null�select�update�delete�text)�and_�or_)�asc�desc)�appN�DATABASE_URIi� Ti )� pool_size�
pool_pre_ping�pool_recycle�DATABASE_URI_CONFc �2 � e Zd Zd� Zd� Zd� Zd� Zd� Zd� ZdS )�
HallLogsModelc � � t � � | _ t d| j t �� � | _ d S # t
$ r}t
|� � Y d }~d S d }~ww xY w)N� scan_logs)�
autoload_with)r �metar �engine_confr � Exception�print)�self�es �F/home/numerotech/hs.numerotech.com/scan_v1/core/model/HallLogsModel.py�__init__zHallLogsModel.__init__ sd � ���Z�Z�4�9��;�� ��M�M�M�4�>�>�>�� � � � ���8�8�8�8�8�8�8�8�8��������s �48 �
A�A�Ac �b � t � � � 5 }t dt |� � z dz |z dz � � }|� |� � }|� � � }|� � � |rt |j � � nd cd d d � � S # 1 swxY w Y d S )Nz*select * from conference where conf_id = z and conf_key = 'z' limit 1;) �engine�connectr �str�execute�first�close�dict�_mapping)r �conf_id�conf_key�conn�stmt�results r! �GetConfzHallLogsModel.GetConf s� � �
�~�~��� 4�4��=�c�'�l�l�J�K^�^�_g�g�hu�u�v�v�4��L�L����6��L�L�N�N�6��:�:�<�<�<�#)�
3�$�v��
�
�
�t�4� 4� 4� 4� 4� 4� 4� 4� 4� 4� 4� 4���� 4� 4� 4� 4� 4� 4s �A=B$�$B(�+B(c � � t � � � 5 }t dt |� � z dz t |� � z dz � � }t |� � |� |� � }|� � � }|� � � |rt |j � � nd cd d d � � S # 1 swxY w Y d S )Nz#select * from halls where conf_id =z and (pin_number =z) and is_active = 1 ;)
r$ r% r r&