import os

from pydantic import BaseModel, Field


class PostgresStorageConfig(BaseModel):
    dbname: str = Field(os.getenv("POSTGRES_DBNAME") or "mem0x", description="Mem0x database")
    user: str = Field(os.getenv("POSTGRES_USER") or "user", description="Postgres user")
    password: str = (Field(os.getenv("POSTGRES_PASSWORD") or "password", description="Postgres user password"),)
    host: str = (Field(os.getenv("POSTGRES_HOST") or "127.0.0.1", description="Postgres host"),)
    port: int = Field(5432, description="Postgres port")
