feat: 新增对PostgreSQL数据库的支持

This commit is contained in:
insistence
2024-10-22 16:27:47 +08:00
parent bb143ac15a
commit c7af974d3f
18 changed files with 1092 additions and 94 deletions

View File

@@ -4,6 +4,7 @@ import sys
from dotenv import load_dotenv
from functools import lru_cache
from pydantic_settings import BaseSettings
from typing import Literal
class AppSettings(BaseSettings):
@@ -38,6 +39,7 @@ class DataBaseSettings(BaseSettings):
数据库配置
"""
db_type: Literal['mysql', 'postgresql'] = 'mysql'
db_host: str = '127.0.0.1'
db_port: int = 3306
db_username: str = 'root'