1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00

Создание чата5

This commit is contained in:
MoonTestUse1
2025-01-05 05:57:42 +06:00
parent 0dd0690990
commit e08b03dbe6
5 changed files with 107 additions and 56 deletions

View File

@@ -16,4 +16,7 @@ class User(Base):
# Отношения для чата
employee_chats = relationship("Chat", foreign_keys="[Chat.employee_id]", back_populates="employee")
admin_chats = relationship("Chat", foreign_keys="[Chat.admin_id]", back_populates="admin")
sent_messages = relationship("Message", back_populates="sender")
sent_messages = relationship("Message", back_populates="sender")
# Отношения для заявок
requests = relationship("Request", back_populates="employee")