feat: Enhance data models and sorting logic for investors and projects

This commit is contained in:
bolade
2025-11-11 13:09:30 +01:00
parent 0e4763bf4f
commit 5e83734acf
6 changed files with 129 additions and 35 deletions
+4
View File
@@ -162,6 +162,7 @@ class InvestorMember(Base, TimestampMixin):
role = Column(String, nullable=True)
title = Column(String, nullable=True) # Alternative to role
email = Column(String, nullable=True)
linkedin = Column(String, nullable=True) # LinkedIn profile URL
source_url = Column(String, nullable=True) # URL where member info was found
investor_id = Column(Integer, ForeignKey("investors.id"))
@@ -215,6 +216,8 @@ class CompanyTable(Base, TimestampMixin):
description = Column(String, nullable=True)
founded_year = Column(Integer, nullable=True)
website = Column(String, nullable=True)
product_service = Column(Text, nullable=True) # Product/service description
clients = Column(JSON, nullable=True) # List of client names or client information
members = relationship(
"CompanyMember", back_populates="company", cascade="all, delete-orphan"
@@ -300,6 +303,7 @@ class ProjectTable(Base, TimestampMixin):
description = Column(Text, nullable=True)
start_date = Column(DateTime, nullable=True)
end_date = Column(DateTime, nullable=True)
is_archived = Column(Integer, default=0, nullable=False) # 0 = active, 1 = archived
sector = relationship(
"SectorTable", secondary=project_sector_association, back_populates="projects"