Dialoge für PostgreSQL erstellt

This commit is contained in:
2025-06-22 18:12:27 +02:00
parent b8441d1ab4
commit b226be4e4e
8 changed files with 550 additions and 5 deletions
+12 -3
View File
@@ -57,6 +57,17 @@ class XslDir(BaseModel):
path_to_root_dir: Path
class PostgreSqlDb(BaseModel):
id: int
name: str
host: str
port: int = 5432
database: str
username: str
password: str
ssl_mode: str = "prefer" # disable, allow, prefer, require, verify-ca, verify-full
class PdfProject(BaseModel):
id: int
name: str
@@ -106,6 +117,7 @@ class AppSettings(BaseSettings):
apache_fops: list[ApacheFop] = []
xsl_dirs: list[XslDir] = []
pdf_projects: list[PdfProject] = []
postgresql_dbs: list[PostgreSqlDb] = []
theme: str | None = None
model_config = SettingsConfigDict(json_file=config_path)
@@ -166,6 +178,3 @@ class PdfProjectSettings(BaseModel):
def writeSettings(self, project_dir: Path):
with open(project_dir / "project.yaml", "w", encoding="utf8") as f:
f.write(to_yaml_str(self))