feat(infra): Stabilized Docker env, fixed circular imports, enabled AI Enricher Robot v1.1
This commit is contained in:
@@ -44,18 +44,22 @@ class PointsLedger(Base):
|
||||
|
||||
class UserStats(Base):
|
||||
__tablename__ = "user_stats"
|
||||
__table_args__ = SCHEMA_ARGS
|
||||
__table_args__ = {"schema": "data", "extend_existing": True} # Biztosítjuk a sémát
|
||||
|
||||
# A ForeignKey-nek látnia kell a data sémát!
|
||||
user_id: Mapped[int] = mapped_column(Integer, ForeignKey("data.users.id"), primary_key=True)
|
||||
|
||||
total_xp: Mapped[int] = mapped_column(Integer, default=0)
|
||||
social_points: Mapped[int] = mapped_column(Integer, default=0)
|
||||
current_level: Mapped[int] = mapped_column(Integer, default=1)
|
||||
|
||||
# --- BÜNTETŐ RENDSZER (Strike System) ---
|
||||
# JAVÍTÁS: server_default hozzáadva, hogy a meglévő sorok is 0-t kapjanak
|
||||
# --- BÜNTETŐ RENDSZER ---
|
||||
penalty_points: Mapped[int] = mapped_column(Integer, server_default=text("0"), default=0)
|
||||
restriction_level: Mapped[int] = mapped_column(Integer, server_default=text("0"), default=0)
|
||||
|
||||
updated_at: Mapped[datetime] = mapped_column(DateTime, default=func.now(), onupdate=func.now())
|
||||
|
||||
# VISSZAMUTATÁS A USER-RE: a back_populates értéke meg kell egyezzen a User osztály 'stats' mezőjével!
|
||||
user: Mapped["User"] = relationship("User", back_populates="stats")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user