Nuevos cambios en el servidor

This commit is contained in:
2026-01-27 13:22:13 -07:00
parent 6215fc40a7
commit 7bb3d1a0ac
33 changed files with 8737 additions and 169 deletions

View File

@@ -1,4 +1,3 @@
"""
System Model - ServiceManagerWeb
"""
@@ -19,7 +18,11 @@ class System(Base):
# Relationships
# If we want tickets to link to systems, we will add relationship in Ticket later or now.
# We will assume Ticket links to System.
tickets: Mapped[List["Ticket"]] = relationship("Ticket", back_populates="system")
tickets: Mapped[List["Ticket"]] = relationship(
"Ticket",
back_populates="affected_system",
foreign_keys="Ticket.affected_system_id"
)
def __repr__(self) -> str:
return f"<System(id={self.id}, name='{self.name}')>"