from __future__ import annotations

from pydantic import Field
from pydantic_settings import BaseSettings, SettingsConfigDict


class Settings(BaseSettings):
    model_config = SettingsConfigDict(env_file=".env", extra="ignore")

    app_name: str = "Validation Suite"
    environment: str = "local"
    database_url: str = Field(
        default="postgresql+psycopg://validation:validation123@postgres:5432/validation_suite",
        alias="DATABASE_URL",
    )
    jwt_secret: str = Field(default="change-me-in-production", alias="JWT_SECRET")
    jwt_algorithm: str = "HS256"
    access_token_minutes: int = 60 * 8
    cors_origins: list[str] = ["http://localhost:3000"]
    public_base_url: str = Field(default="http://localhost:8000", alias="PUBLIC_BASE_URL")
    admin_email: str = Field(default="admin@schubamed.de", alias="ADMIN_EMAIL")
    admin_password: str = Field(default="ValidationSuite!2026", alias="ADMIN_PASSWORD")


settings = Settings()
