feat: Add InvestorInsightCache model and implement caching for investor insights
This commit is contained in:
@@ -311,3 +311,24 @@ class ProjectTable(Base, TimestampMixin):
|
||||
companies = relationship(
|
||||
"CompanyTable", secondary=project_company_association, back_populates="projects"
|
||||
)
|
||||
|
||||
|
||||
class InvestorInsightCache(Base, TimestampMixin):
|
||||
__tablename__ = "investor_insight_cache"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
investor_id = Column(
|
||||
Integer, ForeignKey("investors.id"), nullable=False, unique=True
|
||||
)
|
||||
|
||||
# Cached insights
|
||||
investment_pattern_analysis = Column(Text, nullable=False)
|
||||
market_position = Column(Text, nullable=False)
|
||||
|
||||
# Cache management
|
||||
last_refreshed = Column(
|
||||
DateTime(timezone=True), server_default=func.now(), nullable=False
|
||||
)
|
||||
|
||||
# Relationship to investor
|
||||
investor = relationship("InvestorTable")
|
||||
|
||||
Reference in New Issue
Block a user