feat: Add industry column to ProjectTable and update related schemas and query filters
This commit is contained in:
@@ -182,6 +182,7 @@ def filter_projects(
|
||||
min_valuation: Optional[int] = Query(None, description="Minimum valuation"),
|
||||
max_valuation: Optional[int] = Query(None, description="Maximum valuation"),
|
||||
location: Optional[str] = Query(None, description="Location (partial match)"),
|
||||
industry: Optional[str] = Query(None, description="Industry (partial match)"),
|
||||
sector: Optional[str] = Query(None, description="Sector name (partial match)"),
|
||||
investor_name: Optional[str] = Query(
|
||||
None, description="Investor name (partial match)"
|
||||
@@ -215,6 +216,9 @@ def filter_projects(
|
||||
if location:
|
||||
query = query.filter(ProjectTable.location.ilike(f"%{location}%"))
|
||||
|
||||
if industry:
|
||||
query = query.filter(ProjectTable.industry.ilike(f"%{industry}%"))
|
||||
|
||||
if sector:
|
||||
query = query.join(ProjectTable.sector).filter(
|
||||
SectorTable.name.ilike(f"%{sector}%")
|
||||
|
||||
Reference in New Issue
Block a user