Files

102 lines
2.1 KiB
Python
Raw Permalink Normal View History

from datetime import datetime
from enum import Enum
from typing import List, Optional
from pydantic import BaseModel
class InvestmentStage(str, Enum):
SEED = "SEED"
SERIES_A = "SERIES_A"
SERIES_B = "SERIES_B"
SERIES_C = "SERIES_C"
GROWTH = "GROWTH"
LATE_STAGE = "LATE_STAGE"
class SectorSchema(BaseModel):
id: int
name: str
class Config:
from_attributes = True
2025-09-25 17:00:38 +01:00
class InvestorMemberSchema(BaseModel):
id: int
name: str
role: str | None
email: str | None
2025-09-25 17:00:38 +01:00
class Config:
from_attributes = True
2025-09-25 17:00:38 +01:00
class CompanyMemberSchema(BaseModel):
id: int
name: Optional[str]
linkedin: Optional[str]
role: Optional[str]
2025-09-25 17:00:38 +01:00
company_id: int
class Config:
from_attributes = True
class CompanySchema(BaseModel):
id: int
name: str
industry: str | None
location: str | None
2025-09-25 17:00:38 +01:00
description: Optional[str]
founded_year: Optional[int]
website: Optional[str]
created_at: Optional[datetime] = None
updated_at: Optional[datetime] = None
class Config:
from_attributes = True
class InvestorSchema(BaseModel):
id: int
name: str
description: Optional[str]
aum: int | None
check_size_lower: int | None
check_size_upper: int | None
geographic_focus: str | None
stage_focus: InvestmentStage
number_of_investments: int | None
created_at: Optional[datetime] = None
updated_at: Optional[datetime] = None
class Config:
from_attributes = True
class InvestorData(BaseModel):
"""Comprehensive investor data schema for LLM processing"""
investor: InvestorSchema
2025-09-25 17:00:38 +01:00
portfolio_companies: List[CompanySchema]
team_members: List[InvestorMemberSchema]
sectors: List[SectorSchema]
class Config:
from_attributes = True
2025-09-25 17:00:38 +01:00
class CompanyData(BaseModel): # Renamed from CompaniesData for consistency
company: CompanySchema
sectors: List[SectorSchema]
members: List[CompanyMemberSchema]
investors: List[InvestorSchema]
class Config:
from_attributes = True
class InvestorList(BaseModel):
investors: List[InvestorData]