Fix parsing phone and add redis storage for FSM in telegram bot

This commit is contained in:
2026-01-17 20:03:33 +03:00
parent a065c6b7be
commit 781527f2de
14 changed files with 153 additions and 27 deletions

View File

@@ -0,0 +1,16 @@
from typing import Literal
class StorageSettings(BaseModel):
type: StorageTypeEnum
class MemoryStorageSettings(StorageSettings):
type: Literal[StorageType.MEMORY.value] = StorageTypeEnum.MEMORY.value
class RedisStorageSettings(StorageSettings):
type: Litreal[StorageType.REDIS.value] = StorageTypeEnum.REDIS.value
host: str = "localhost"
port: int = 6379
database: int = 0