Auditoria funcionando

This commit is contained in:
2026-02-12 12:23:11 -07:00
parent 96084b89c0
commit 96cd09476c
24 changed files with 2363 additions and 37 deletions

View File

@@ -78,6 +78,13 @@ class User(Base):
back_populates="assigned_to_user",
foreign_keys="Ticket.assigned_to"
)
# Refresh tokens: especificar user_id como FK (hay 2 FKs: user_id y revoked_by)
refresh_tokens: Mapped[List["RefreshToken"]] = relationship(
"RefreshToken",
back_populates="user",
cascade="all, delete-orphan",
foreign_keys="[RefreshToken.user_id]"
)
# Unique constraint por tenant
__table_args__ = (