-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsalary.py
More file actions
72 lines (48 loc) · 1.91 KB
/
Copy pathsalary.py
File metadata and controls
72 lines (48 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
"""Pydantic schemas for salary structure, RSU grants, and growth assumptions."""
from __future__ import annotations
from datetime import date
from decimal import Decimal
from pydantic import BaseModel, Field
class SalaryComponents(BaseModel):
"""Compensation breakdown for a single fiscal year."""
base_salary_annual: Decimal = Decimal(0)
hra_annual: Decimal | None = None
bonus_annual: Decimal = Decimal(0)
epf_monthly: Decimal = Decimal(3600)
nps_monthly: Decimal = Decimal(0)
special_allowance_annual: Decimal = Decimal(0)
other_taxable_annual: Decimal = Decimal(0)
class SalaryStructureConfig(BaseModel):
"""Update payload for salary structure (keyed by FY string)."""
salary_structure: dict[str, SalaryComponents]
class RsuVesting(BaseModel):
"""A single vesting event within an RSU grant."""
date: date
quantity: int = Field(gt=0)
price_at_vest: Decimal | None = Field(
default=None,
gt=0,
description="Stock price on the vest date, locked in once the vesting has passed.",
)
class RsuGrant(BaseModel):
"""An RSU grant with its vesting schedule."""
id: str
stock_name: str = Field(min_length=1)
stock_price: Decimal = Field(gt=0)
grant_date: date | None = None
notes: str | None = None
vestings: list[RsuVesting] = Field(min_length=1)
class RsuGrantsConfig(BaseModel):
"""Update payload for RSU grants."""
rsu_grants: list[RsuGrant]
class GrowthAssumptions(BaseModel):
"""Growth parameters for multi-year tax projections."""
base_salary_growth_pct: float = 0
bonus_growth_pct: float = 0
epf_scales_with_base: bool = True
nps_growth_pct: float = 0
stock_price_appreciation_pct: float = 0
projection_years: int = Field(default=3, ge=1, le=5)
class GrowthAssumptionsConfig(BaseModel):
"""Update payload for growth assumptions."""
growth_assumptions: GrowthAssumptions