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

170 lines
23 KiB
Plaintext
Raw Normal View History

Ë
ˆyíhùVãóšddlmZddlmZddlmZmZmZmZddl m
Z
m Z m Z m
Z
ddlmZddlmZmZmZmZmZmZddlmZddlmZmZe
d g¬
«ZGd d e«ZGd
de«Zej?dee¬«e
ddd¬«e
dddd¬«e
dd¬«e e«fde de dee defd«Z!ej?d ee¬«e
dd!¬«e
dd"¬«e
dd#¬«e
dd$¬«e
dd%¬«e
dd&¬«e
dd'¬«e
ddd¬«e
dddd¬«e
dd¬«e e«f d(eed)ee d*ee d+ee"d,ee"d-ee d.ee de de dee defd/„«Z#ej?d0e¬«e e«fd1e defd2„«Z$ejKde¬«e e«fd3edefd4„«Z&ejOd0e¬«e e«fd1e d3edefd5„«Z(ejSd0«e e«fd1e defd6„«Z*ej?d7ee¬«e
dd8¬«e
ddd¬«e
dddd¬«e e«fd1e d9e de de def
d:„«Z+y);é)ÚOptional)Úget_db)Ú FundTableÚ
InvestorTableÚ ProjectTableÚ SectorTable)Ú APIRouterÚDependsÚ
HTTPExceptionÚQuery)Ú BaseModel)ÚCompanyMinimalÚInvestmentResponseÚInvestmentStageÚ InvestorDataÚPaginatedResponseÚ
SectorMinimal)Ú(calculate_project_investor_compatibility)ÚSessionÚ selectinloadzInvestor Routes)ÚtagscóŠeZdZUeed<dZeeed<dZeeed<dZeeed<e ed<e ed<e ed<eed <d
Z
e ed <y) ÚInvestorCreateÚnameNÚ descriptionÚwebsiteÚ headquartersÚaumÚcheck_size_lowerÚcheck_size_upperÚgeographic_focusrÚnumber_of_investments) Ú__name__Ú
__module__Ú __qualname__ÚstrÚ__annotations__rrrrÚintr"©óúL/home/oluwasanmi/Documents/Work/MKD/anton_wireframe/app/routers/investors.pyrrsSØ
ƒIØ!%€K˜#‘Ó!€GˆXc‰]Ó!Ø"&€L(˜3 ƒHØÓØÓØÓØ!"И"r*rcóÂeZdZUdZeeed<dZeeed<dZeeed<dZ eeed<dZ
ee ed<dZ ee ed<dZ
ee ed<dZeeed <dZee ed
<y) ÚInvestorUpdateNrrrrrrr r!r")r#r$r%rrr&r'rrrrr(rr r!r"r)r*r+r-r-"s„Ø€Dˆ(3‰-ÓØ!%€K˜#‘Ó!€GˆXc‰]Ó!Ø"&€L(˜3€Cˆ#‰ÓØ&*Ðh˜s*Ø&*Ðh˜s*Ø&*Ðh˜s*Ø+/И8 C™=Ô/r*r-z
/investors)Úresponse_modelézPage number (starts at 1))Úgeré
édzItems per page (max 100))r0ÚlerNz-Optional project ID for compatibility scoring)rÚpageÚ page_sizeÚ
project_idÚdbcóH|dz
|z}|jt«j«}d}|x|jt«j t tj ««jtj|k(«j«}|s
tdd¬«|jt«j t tj«t tj«t tj«t tj«j tj «t tj«j tj««j#|«j%|«j'«}g}|D} d}
|t)|| d¬«}
| jdd D cgc]#} t+| j| j,¬
«Œ%} } | jr(| jD]}
|
j r3d j/|
j Dcgc]}|j,Œc}«nd}|
jr|
jdd ngDcgc]#}t1|j|j,¬
«Œ%}}t3| j|
j4r| j,d |
j4n | j,| j6|
j8|
j:|
j<|| ||
¬
«
}|j?|«ŒŒ†t3| j| j,| j6dddd| g|
¬
«
}|j?|«ŒÌ||zdz
|z}tA|||||¬«Scc} wcc}wcc}w)aGet all investors with their funds as separate entries (paginated)
Each investor-fund combination is returned as a separate row.
An investor with 3 funds will appear as 3 entries.
If project_id is provided, calculates compatibility scores for each investor.
r/Né”úProject not found©Ú status_codeÚdetailçð?T©ÚprojectÚinvestorÚ use_fundsé©Úidrú, ú - ©
rErrrr r!Ú stage_focusÚportfolio_companiesÚsectorsÚcompatibility_score©ÚitemsÚtotalr4r5Ú total_pages)!ÚqueryrÚcountrÚoptionsrÚsectorÚfilterrEÚfirstr rJÚ team_membersrKÚfundsrÚinvestment_stagesÚoffsetÚlimitÚallrrrÚjoinrrÚ fund_namerrr r!Úappendr)r4r5r6r7rZÚ total_countr@Ú investorsÚinvestment_responsesrArLÚcompanyrJÚfundÚstagerIrTÚ fund_sectorsÚinvestment_responserPs r+Úread_investorsrh.s9ð"Q‰h˜
#€Fð—(‘(œ=Ó1€Kð€GØÐà H‰H”\Ó
‰W”\¤,×"5Ñ"5Ó
‰V”L—OO 
‰U‹Wð ñ ܨCÐ8KÔ  Óß Ü œ× œ× œ× œ× :¼9×;VÑ;VÓ œ× :¼9×;LÑ;LÓ 
÷
ß ˆyÓ ß ððÐØó;àØ Ð Ü"Jب(¸dô#Ð ð¸Ð
àô
˜gŸj™j¨w¯|©|Ö 
Ðð
ð > Ÿó
Að×—I‘I°t×7MÑ7MÖN¨e˜uŸzðð8<·|²| 4§<¡<°°Ñ#3Èö àô" V§Y¡Y°V·[±[Ö  ð ô
'9Ø—{—~%ŸM™M˜?¨#¨d¯n©nÐ-=ÑØ Ÿ Ø%)×%:Ñ%:Ø%)×%:Ñ%:Ø%)×%:Ñ%:Ø +Ø(;Ø(Ø(;ô
'Ð%×+Ð,?Ö@ò9
Aô>#5Ø—;—]—L‘LØ!%Ø!%Ø!%Ø Ø$7ØØ$7ô #Ð ð
!× 'Ð(;Ö <ðw;=ð| Ñ*¨QÑ.°9Ñ<€Kä ØØ
ØØô  ðùòo
ùòOùò  sÇ(NÉN É;(Nz/investors/filterzFilter by investment stagezMinimum check sizezMaximum check sizez Geographic focus (partial match)zSector name (partial match)z Minimum AUMz Maximum AUMreÚmin_check_sizeÚmax_check_sizeÚ geographyrTÚmin_aumÚmax_aumc
óR d} | x|
jt«jttj««j tj | k(«j«} | s
tdd¬«|
jt«jttj«jtj«ttj«jtj«ttj«jtj«ttj«ttj««} |"| j tj |k\«} |"| j tj"|k«} |r2| j tj$j'd|d««} |?| j)tj«j tj*|k\«} |C|| j)tj«} | j tj*|k«} |rO| j)tj«j t,j.j'd|d««} | j1«}
|dz
|z}| j3|«j5|«j7«}g}|D]o}|j}d}| t9| |d¬ «}|jdd
Dcgc]#}t;|j |j.¬ «Œ%}}|jr3d j)|jDcgc]}|j.Œc}«nd}|jr|jdd
ngDcgc]#}t=|j |j.¬ «Œ%}}t?|j |j@r|j.d
|j@n |j.|j*|j |j"|j$||||¬«
}|jC|«Œr|
|zdz
|z}tE||
|||¬«Scc}wcc}wcc}w)züFilter investors based on various criteria (paginated)
Returns investor-fund combinations as separate rows.
Queries the funds table to find matching funds.
If project_id is provided, calculates compatibility scores for each investor.
Nr9r:r;ú%r/r>Tr?rCrDrFrGrHrM)#rQrrSrrTrUrErVr rrArrJrWrKrYrr r!Úiliker]rrrrRrZr[r\rrrrr^r_r)rerirjrkrTrlrmr4r5r6r7r@rQr`rZrXrbrdrArLrcrJrIrfrgrPs r+Úfilter_investorsrqªsð:€GØÐà H‰H”\Ó
‰W”\¤,×"5Ñ"5Ó
‰V”L—OO 
‰U‹Wð ñ ܨCÐ8KÔ 
H‰H”YÓ × ”Y×(× × 
ô ”Y×(×5´m×6PÑ6PÓ”Y×(×5´m×6KÑ6KÓ”Y×”Y×
€EðÐ œY×7¸>ÑàÐ œY×7¸>ÑáØ œY×À)ÀÈAÐ>NÓðÐØ
œ9×.×5´m×6GÑ6GÈ7Ñ6RÓàÐØ ˆ?Ø—J‘Jœy×2ˆEØ œ]×.°'Ñ:ˆñØ
œ9× × Ñ × " Q v h¨a  
ˆð
—+‘+“-€KðQ‰h˜)Ñ
#€FØ L‰L˜Ó × &  1× 7€EðÐØó+Ø—=‘=ˆðØ Ð Ü"Jب(¸dô#Ð ð¸Ð
àô
˜gŸj™j¨w¯|©|Ö 
Ðð
ð×
I‰I¨t×/EÑ/EÖF eu—z“zÒ ð ð04¯|ª|˜4Ÿ<™<¨¨Ñö
àô
˜VŸY™Y¨V¯[©[Ö 
ˆ ð
ô
{‰{à~Š~ð—MM? # d§n¡nÐ%5ÑØ Ø#Ø 3Ø Ø 3ô

Ðð ×#Ð$7Ö8ðW+9ð\ Ñ*¨QÑ.°9Ñ<€Kä ØØ
ØØô  ðùòK
ùòGùò 
sÌ?(RÎR
Ï (R$z/investors/{investor_id}Ú investor_idcóò|jt«jttj«ttj
«ttj «ttj««jtj|k(«j«}|s
tdd¬«t||j|j
|j |j¬«S)z2Get a specific investor by ID with all their fundsr9úInvestor not foundr;©rArJrWrKrX)
rQrrSrrJrWrKrXrUrErVr r)rrr7rAs r+Ú
read_investorrv8ð Óß Ü œ× œ× œ× œ× 
÷

× Ñ  KÑ/Ó 0ß ð
ñ ܨÐ4HÔ ØØ×× Ñ Øn‰nô  ðr*rAcó~tdi|j«¤Ž}|j|«|j«|j |«|j t«j
ttj«ttj«ttj«ttj««jtj|jk(«j«}t||j|j|j|j¬«S)zCreate a new investorrur))rÚdictÚaddÚcommitÚrefreshrQrSrrJrWrKrXrUrErVr)rAr7Ú db_investorÚinvestor_with_relationss r+Úcreate_investorr~Tô Ñ2 (§-¡-£/Ñ2€K؇FFˆ;ÔØ‡II„K؇JJˆ{Ôð Óß Ü œ× œ× œ× œ× 
÷

× Ñ  K§N¡NÑ2Ó 3ß ðô Ø,×'×%×  ðr*có(|jt«jtj|k(«j «}|s
t dd¬«|j
d¬«}|j«D]\}}t|||«Œ|j«|j|«|jt«jttj«ttj«ttj«ttj ««jtj|k(«j «}t#||j|j|j|j ¬«S)zUpdate an existing investorr9rtr;T)Ú
exclude_unsetru)rQrrUrErVr rxrNÚsetattrrzr{rSrrJrWrKrXr)rrrAr7r|Ú update_dataÚfieldÚvaluer}s r+Úupdate_investorr…ss?ð Ó×&¤}×'7Ñ'7¸;Ñ'FÓG×ñ ܨÐ4HÔ—-‘-¨d3€KØ+‰ ˆˆuÜ ˜U EÕ‡II„K؇JJˆ{Ôð Óß Ü œ× œ× œ× œ× 
÷

× Ñ  KÑ/Ó 0ß ðô Ø,×'×%×  ðr*cóð|jt«jtj|k(«j «}|s
t dd¬«|j
|«|j«ddiS)zDelete an investorr9rtr;ÚmessagezInvestor deleted successfully)rQrrUrErVr Údeleterz)rrr7r|s r+Údelete_investorr‰œshð Ó×&¤}×'7Ñ'7¸;Ñ'FÓG×ñ ܨÐ4HÔ‡IIˆkÔØ‡II„KØ Ð 7r*z /investors/{investor_id}/similarz-Maximum number of similar investors to returnr[c
óŠ|jt«jttj«ttj
«ttj «ttj«jtj«ttj«jtj ««jtj|k(«j«}|s
tdd¬«t«}t«}g}g} |jD}
|
j r3|j|
j D chc]} | jŒc} «|