feat: add cached homepage information and manual AI interpretations
This commit is contained in:
@@ -572,3 +572,24 @@ class MCPAudit(Base):
|
||||
result_code: Mapped[str] = mapped_column(String(60))
|
||||
elapsed_ms: Mapped[int] = mapped_column(Integer)
|
||||
created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), default=now, index=True)
|
||||
|
||||
|
||||
class HomeInformation(Base):
|
||||
"""Account-scoped last successful source and manually generated interpretation."""
|
||||
__tablename__ = "home_information"
|
||||
user_id: Mapped[str] = mapped_column(String(100), primary_key=True)
|
||||
resource: Mapped[str] = mapped_column(String(200), primary_key=True)
|
||||
content: Mapped[dict | None] = mapped_column(JSON)
|
||||
version: Mapped[str | None] = mapped_column(String(64))
|
||||
fetched_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True))
|
||||
error: Mapped[str | None] = mapped_column(Text)
|
||||
analysis: Mapped[dict | None] = mapped_column(JSON)
|
||||
|
||||
|
||||
class HomeRankHistory(Base):
|
||||
__tablename__ = "home_rank_history"
|
||||
id: Mapped[str] = mapped_column(String(36), primary_key=True)
|
||||
user_id: Mapped[str] = mapped_column(String(100), index=True)
|
||||
scope: Mapped[str] = mapped_column(String(200))
|
||||
rank: Mapped[int] = mapped_column(Integer)
|
||||
fetched_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), default=now)
|
||||
|
||||
Reference in New Issue
Block a user