Ruff format/ Cleanup
This commit is contained in:
@@ -18,6 +18,7 @@ from ._base import Base, DictLikeMixin
|
||||
|
||||
class AuditEvent(DictLikeMixin, Base):
|
||||
"""События аудита (флоу пользователя)."""
|
||||
|
||||
__tablename__ = "audit_events"
|
||||
__table_args__ = (
|
||||
Index("ix_audit_events_tg_created", "actor_tg_id", "created_at"),
|
||||
|
||||
@@ -6,7 +6,9 @@ from ._base import Base, DictLikeMixin
|
||||
class Key(DictLikeMixin, Base):
|
||||
__tablename__ = "keys"
|
||||
|
||||
user_id = Column(BigInteger, ForeignKey("users.id", ondelete="CASCADE"), primary_key=True, nullable=False, index=True)
|
||||
user_id = Column(
|
||||
BigInteger, ForeignKey("users.id", ondelete="CASCADE"), primary_key=True, nullable=False, index=True
|
||||
)
|
||||
client_id = Column(String, primary_key=True)
|
||||
tg_id = Column(BigInteger, ForeignKey("users.tg_id"), nullable=True, index=True)
|
||||
email = Column(String, unique=True)
|
||||
|
||||
@@ -74,9 +74,7 @@ class WebPageVariantBlock(DictLikeMixin, Base):
|
||||
|
||||
class WebPushSubscription(DictLikeMixin, Base):
|
||||
__tablename__ = "web_push_subscriptions"
|
||||
__table_args__ = (
|
||||
Index("ix_web_push_subscriptions_user_id", "user_id"),
|
||||
)
|
||||
__table_args__ = (Index("ix_web_push_subscriptions_user_id", "user_id"),)
|
||||
|
||||
id = Column(String(36), primary_key=True, default=lambda: str(uuid.uuid4()))
|
||||
user_id = Column(BigInteger, nullable=False)
|
||||
@@ -124,7 +122,9 @@ class WebErrorReport(DictLikeMixin, Base):
|
||||
count = Column(Integer, nullable=False, default=1)
|
||||
resolved = Column(Boolean, nullable=False, default=False)
|
||||
first_seen_at = Column(DateTime(timezone=True), default=lambda: datetime.now(UTC))
|
||||
last_seen_at = Column(DateTime(timezone=True), default=lambda: datetime.now(UTC), onupdate=lambda: datetime.now(UTC))
|
||||
last_seen_at = Column(
|
||||
DateTime(timezone=True), default=lambda: datetime.now(UTC), onupdate=lambda: datetime.now(UTC)
|
||||
)
|
||||
|
||||
|
||||
class WebFlowEvent(DictLikeMixin, Base):
|
||||
|
||||
Reference in New Issue
Block a user