Files
Anton_wireframe/app/routers/__pycache__/companies.cpython-312.pyc
T

57 lines
9.3 KiB
Plaintext
Raw Normal View History

2025-09-25 17:00:38 +01:00
Ë
æWÕh£ãó$ddlmZmZddlmZddlmZmZddlm Z m
Z
m Z m Z ddl
mZddlmZddlmZmZe dg¬ «ZGd
d e«ZGd d
e«Zej/dee¬«e
e«fdefd«Zej/dee¬«e dd¬«e dd¬«e dd¬«e dd¬«e dd¬«e dd¬«e
e«fdeedeedeedeedeed eedefd!„«Zej/d"e¬«e
e«fd#edefd$„«Zej=de¬«e
e«fd%edefd&„«ZejAd"e¬«e
e«fd#ed%edefd'„«Z!ejEd"«e
e«fd#edefd(„«Z#y))é)ÚListÚOptional)Úget_db)Ú CompanyTableÚ
InvestorTable)Ú APIRouterÚDependsÚ
HTTPExceptionÚQuery)Ú BaseModel)Ú CompanyData)ÚSessionÚ selectinloadzCompany Routes)ÚtagscóheZdZUeed<eed<eed<dZeeed<dZeeed<dZ eeed<y)Ú
CompanyCreateÚnameÚindustryÚlocationNÚ descriptionÚ founded_yearÚwebsite)
Ú__name__Ú
__module__Ú __qualname__ÚstrÚ__annotations__rrrÚintr©óúN/home/oluwasanmi/Documents/Work/MKD/anton_wirefram_v2/app/routers/companies.pyrrs;Ø
ƒI؃M؃MØ!%€K˜#Ó%Ø"&€L(˜3!€GˆXc‰]Ô!r rcó†eZdZUdZeeed<dZeeed<dZeeed<dZ eeed<dZ
ee ed<dZ eeed<y)Ú
CompanyUpdateNrrrrrr)
rrrrrrrrrrrrrrr r!r#r#sVØ€Dˆ(3‰-ÓØ"€Hˆhs‰mÓ"€Hˆhs‰mÓ"Ø!%€K˜#Ó%Ø"&€L(˜3!€GˆXc‰]Ô!r r#z
/companies)Úresponse_modelÚdbcó†|jt«jttj«ttj
«ttj ««j«}g}|D]@}t||j|j
|j ¬«}|j|«ŒB|S)z3Get all companies with their investor relationships©ÚcompanyÚ investorsÚmembersÚsectors)
ÚqueryrÚoptionsrr)r*r+Úallr
Úappend)r%Ú companiesÚcompany_data_listr(Ú company_datas r!Úread_companiesr3 ð Óß Ü œ× œ× œ× 
÷
ððÐØòܨחO—O
ˆ ð × Ñ  Õ Ðr z/companies/filterNz"Filter by industry (partial match))rz"Filter by location (partial match)zFounded after yearzFounded before yearz%Filter companies with/without websitez'Filter by investor name (partial match)rrÚ
founded_afterÚfounded_beforeÚ has_websiteÚ
investor_namecóN|jt«jttj«ttj
«ttj ««}|r2|jtjjd|d««}|r2|jtjjd|d««}|"|jtj|k\«}|"|jtj|k«}|_|r/|jtjjd««}n.|jtjjd««}|rO|jtj«jt j"jd|d««}|j%«}g} |D]@}
t'|
|
j|
j
|
j ¬«} | j)| «ŒB| S)z*Filter companies based on various criteriaú%Nr')r,rr-rr)r*r+ÚfilterrÚilikerrrÚisnotÚis_Újoinrrr.r
r/) rrr4r5r6r7r%r,r0r1r(r2s r!Úfilter_companiesr?;ð*
H‰H”\Ó "× ”\×”\×”\×
€EñØ œ\×8¸1¸X¸JÀa¸ÓáØ œ\×8¸1¸X¸JÀa¸ÓàÐ Ø œ\×6¸-ÑàÐ œ\×6¸.ÑàÐÙ Ø—L‘L¤×!5Ñ!5×!;Ñ!;¸DÓ!AÓB‰Eà—L×!5Ñ!5×!9Ñ!9¸$Ó!?Ó@ˆØ
œ<× × Ñ × $ q¨¨°qÐ%9Ó 
ˆð— ‘ “ €IðÐØòܨחO—O
ˆ ð × Ñ  Õ Ðr z/companies/{company_id}Ú
company_idcó¬|jt«jttj«ttj
«ttj ««jtj|k(«j«}|s
tdd¬«t||j|j
|j ¬«S)z/Get a specific company by ID with its investorsé”úCompany not found©Ú status_codeÚdetailr') r,rr-rr)r*r+r:ÚidÚfirstr
r
)r@r%r(s r!Ú read_companyrIð Óß Ü œ× œ× œ×