Nuevos cambios en el servidor
This commit is contained in:
@@ -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}')>"
|
||||
|
||||
Reference in New Issue
Block a user