Dialoge für PostgreSQL erstellt
This commit is contained in:
+12
-3
@@ -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))
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user