Controllers added updated implementations and tests awaits

This commit is contained in:
2025-03-31 23:51:27 +03:00
parent 2d32842782
commit 5d30bc2701
20 changed files with 2188 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
from pydantic_settings import BaseSettings, SettingsConfigDict
class Configs(BaseSettings):
"""
MongoDB configuration settings.
"""
USER: str = ""
PASSWORD: str = ""
HOST: str = ""
PORT: int = 0
DB: str = ""
ENGINE: str = ""
@property
def url(self):
"""Generate the database URL."""
return f"{self.ENGINE}://{self.USER}:{self.PASSWORD}@{self.HOST}:{self.PORT}/{self.DB}?retryWrites=true&w=majority"
model_config = SettingsConfigDict(env_prefix="MONGO_")
mongo_configs = Configs() # singleton instance of the MONGODB configuration settings