feat(backend): Update models and endpoints configuration

- Enhanced ticket and comment models with proper relationships
- Updated client_profile model for better data handling
- Improved auth endpoint with better error handling
- Updated main app configuration and imports
- Added new dependencies to requirements.txt
- Enhanced tickets endpoint with attachment support
This commit is contained in:
2026-02-09 13:28:40 -07:00
parent ac0cb6f132
commit 91ff49cdec
9 changed files with 257 additions and 92 deletions

View File

@@ -64,6 +64,11 @@ class TicketComment(Base):
# Relationships
ticket: Mapped["Ticket"] = relationship("Ticket", back_populates="comments")
author: Mapped["User"] = relationship("User")
attachments: Mapped[list["TicketAttachment"]] = relationship(
"TicketAttachment",
back_populates="comment",
cascade="all, delete-orphan"
)
def __repr__(self) -> str:
return f"<TicketComment {self.id} by {self.author_id}>"