summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/db/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/db/models.py')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/db/models.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/db/models.py b/packages/meshbay-hub/src/meshbay_hub/db/models.py
index f1f11e2..3966bdc 100644
--- a/packages/meshbay-hub/src/meshbay_hub/db/models.py
+++ b/packages/meshbay-hub/src/meshbay_hub/db/models.py
@@ -103,7 +103,9 @@ class Group(Base):
# group. Until then the group has no files, no key and nobody to serve it, so
# it is shown to its owner only and is what `prune-groups` collects. Set once
# and never cleared: a node going offline does not un-host a group.
- hosted_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True))
+ hosted_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True))
+ last_activity_at: Mapped[datetime] = mapped_column(
+ DateTime(timezone=True), default=_now, nullable=False)
members: Mapped[list["GroupMember"]] = relationship(back_populates="group")