Добавлено сохранение заказов в postgres
This commit is contained in:
@@ -61,6 +61,10 @@ class TBankPaymentConfig(BaseModel):
|
||||
retry_backoff_seconds: float = Field(default=0.2, ge=0)
|
||||
|
||||
|
||||
class PostgresConfig(BaseModel):
|
||||
dsn: str = Field(..., min_length=1)
|
||||
|
||||
|
||||
class DadataAddressSuggestionsConfig(BaseModel):
|
||||
url: str = "https://suggestions.dadata.ru/suggestions/api/4_1/rs/suggest/address"
|
||||
api_key: str = ""
|
||||
@@ -121,6 +125,7 @@ class Settings(BaseSettings):
|
||||
repository: RepositoryConfig = Field(default_factory=RepositoryConfig)
|
||||
adapter: AdapterConfig = Field(default_factory=AdapterConfig)
|
||||
tbank_payment: TBankPaymentConfig
|
||||
postgres: PostgresConfig
|
||||
address_suggestions: AddressSuggestionsConfig = Field(
|
||||
default_factory=AddressSuggestionsConfig
|
||||
)
|
||||
@@ -153,6 +158,7 @@ class _RequiredYamlSections(BaseModel):
|
||||
repository: dict[str, Any]
|
||||
adapter: dict[str, Any]
|
||||
tbank_payment: dict[str, Any]
|
||||
postgres: dict[str, Any]
|
||||
address_suggestions: dict[str, Any]
|
||||
observability: dict[str, Any]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user