Added everything
This commit is contained in:
11
src/infrastructure/adapters/persistence/mongodb.py
Normal file
11
src/infrastructure/adapters/persistence/mongodb.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from pymongo import MongoClient
|
||||
from pymongo.collection import Collection
|
||||
from core.config import ConfSettings
|
||||
|
||||
# Conexión a MongoDB para Reportes
|
||||
mongo_client = MongoClient(ConfSettings.mongodb_url)
|
||||
mongodb = mongo_client[ConfSettings.mongodb_db]
|
||||
|
||||
def get_reports_collection() -> Collection:
|
||||
"""Obtiene la colección de reportes desde MongoDB"""
|
||||
return mongodb["reportes"]
|
||||
Reference in New Issue
Block a user