feat: creating chats for cards and clients, sending and deleting text messages

This commit is contained in:
2025-03-27 15:13:10 +04:00
parent a466e46f28
commit 2cdccb33ca
25 changed files with 928 additions and 7 deletions

View File

@@ -12,8 +12,8 @@ from .shipping_warehouse import ShippingWarehouse
if TYPE_CHECKING:
from . import (
CardBillRequest, User, BaseModel, Board, CardStatus, CardGroup, CardAttribute, Client, CardTag,
CardService as CardServiceModel, CardProduct,
)
CardService as CardServiceModel, CardProduct, Chat,
)
class Card(BaseModel):
@@ -114,6 +114,9 @@ class Card(BaseModel):
# module employees
employees: Mapped[list['CardEmployees']] = relationship(back_populates='card', lazy='selectin')
# module chat
chat: Mapped[Optional['Chat']] = relationship(back_populates='card', lazy='joined')
# endregion