o
    gB                     @   sx   d dl 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
 e  e dZes.edeeZe Zdd	 ZdS )
    N)AsyncIOMotorClient)init_beanie)load_dotenv)UserBooth
ScanRecordMONGODB_URIu:   MONGODB_URI 환경 변수가 설정되지 않았습니다.c               
      sL   zt ttttgdI d H  W d S  ty% }  z	td|   | d } ~ ww )N)databasedocument_modelszBeanie initialization failed: )r   dbr   r   r   	Exceptionprint)e r   )/home/ubuntu/booths_qr_events/database.pyinit   s   r   )osmotor.motor_asyncior   beanier   dotenvr   modelsr   r   r   getenvDATABASE_URI
ValueErrorclientget_default_databaser   r   r   r   r   r   <module>   s   
