Обновлены модели Sale, AgentTransaction и PartnerTransaction: добавлено уникальное ограничение для поля transaction_group в AgentTransaction, а также исправлены пробелы в определениях полей sale_id и transaction_group. Улучшена читаемость кода.

This commit is contained in:
Redsandyg 2025-06-12 16:03:03 +03:00
parent 736f04bb7e
commit 16973bbb64

View File

@ -53,7 +53,7 @@ class AgentTransaction(SQLModel, table=True):
tg_agent_id: int = Field(foreign_key="tgagent.id") tg_agent_id: int = Field(foreign_key="tgagent.id")
amount: float amount: float
status: str status: str
transaction_group: uuid.UUID = Field(default_factory=uuid.uuid4) transaction_group: uuid.UUID = Field(default_factory=uuid.uuid4, unique=True)
create_dttm: datetime = Field(default_factory=datetime.utcnow) create_dttm: datetime = Field(default_factory=datetime.utcnow)
update_dttm: datetime = Field(default_factory=datetime.utcnow) update_dttm: datetime = Field(default_factory=datetime.utcnow)