brynq-sdk-nmbrs 2.3.4.dev0__py3-none-any.whl → 2.4.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- brynq_sdk_nmbrs/__init__.py +95 -91
- brynq_sdk_nmbrs/absence.py +1 -4
- brynq_sdk_nmbrs/address.py +5 -81
- brynq_sdk_nmbrs/bank.py +1 -2
- brynq_sdk_nmbrs/companies.py +130 -39
- brynq_sdk_nmbrs/contract.py +0 -1
- brynq_sdk_nmbrs/days.py +1 -1
- brynq_sdk_nmbrs/debtors.py +53 -65
- brynq_sdk_nmbrs/department.py +23 -111
- brynq_sdk_nmbrs/document.py +195 -4
- brynq_sdk_nmbrs/employee_wage_tax_settings.py +13 -5
- brynq_sdk_nmbrs/employees.py +55 -21
- brynq_sdk_nmbrs/employment.py +0 -2
- brynq_sdk_nmbrs/extra_fields.py +126 -0
- brynq_sdk_nmbrs/function.py +35 -97
- brynq_sdk_nmbrs/leave.py +53 -58
- brynq_sdk_nmbrs/manager.py +51 -35
- brynq_sdk_nmbrs/salaries.py +48 -65
- brynq_sdk_nmbrs/salary_tables.py +1 -4
- brynq_sdk_nmbrs/schedules.py +5 -78
- brynq_sdk_nmbrs/schemas/absence.py +26 -16
- brynq_sdk_nmbrs/schemas/address.py +2 -29
- brynq_sdk_nmbrs/schemas/children.py +0 -2
- brynq_sdk_nmbrs/schemas/contracts.py +7 -6
- brynq_sdk_nmbrs/schemas/costcenter.py +2 -2
- brynq_sdk_nmbrs/schemas/costunit.py +2 -0
- brynq_sdk_nmbrs/schemas/days.py +13 -11
- brynq_sdk_nmbrs/schemas/debtor.py +6 -28
- brynq_sdk_nmbrs/schemas/department.py +5 -39
- brynq_sdk_nmbrs/schemas/document.py +0 -2
- brynq_sdk_nmbrs/schemas/employee_wage_tax_settings.py +75 -0
- brynq_sdk_nmbrs/schemas/employees.py +2 -0
- brynq_sdk_nmbrs/schemas/extra_fields.py +56 -0
- brynq_sdk_nmbrs/schemas/function.py +5 -32
- brynq_sdk_nmbrs/schemas/hours.py +5 -1
- brynq_sdk_nmbrs/schemas/leave.py +17 -6
- brynq_sdk_nmbrs/schemas/manager.py +11 -20
- brynq_sdk_nmbrs/schemas/salary.py +11 -1
- brynq_sdk_nmbrs/schemas/schedules.py +2 -54
- brynq_sdk_nmbrs/schemas/svw_settings.py +116 -0
- brynq_sdk_nmbrs/schemas/wage_tax.py +53 -21
- brynq_sdk_nmbrs/schemas/wagecomponents.py +6 -9
- brynq_sdk_nmbrs/svw_settings.py +213 -0
- brynq_sdk_nmbrs/wage_tax.py +120 -11
- {brynq_sdk_nmbrs-2.3.4.dev0.dist-info → brynq_sdk_nmbrs-2.4.5.dist-info}/METADATA +1 -1
- brynq_sdk_nmbrs-2.4.5.dist-info/RECORD +58 -0
- brynq_sdk_nmbrs/schemas/social_insurance.py +0 -73
- brynq_sdk_nmbrs/social_insurance.py +0 -130
- brynq_sdk_nmbrs-2.3.4.dev0.dist-info/RECORD +0 -55
- {brynq_sdk_nmbrs-2.3.4.dev0.dist-info → brynq_sdk_nmbrs-2.4.5.dist-info}/WHEEL +0 -0
- {brynq_sdk_nmbrs-2.3.4.dev0.dist-info → brynq_sdk_nmbrs-2.4.5.dist-info}/top_level.txt +0 -0
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
from datetime import datetime
|
|
2
|
-
from typing import Optional
|
|
3
|
-
|
|
4
1
|
import pandas as pd
|
|
5
2
|
import pandera as pa
|
|
6
|
-
|
|
7
|
-
from pandera.typing import DateTime, Float, Series, String
|
|
3
|
+
from pandera.typing import DateTime, Series, String
|
|
8
4
|
from pydantic import BaseModel, Field
|
|
9
5
|
|
|
10
6
|
from brynq_sdk_functions import BrynQPanderaDataFrameModel
|
|
@@ -44,7 +40,10 @@ class DepartmentGet(BrynQPanderaDataFrameModel):
|
|
|
44
40
|
code: Series[String] = pa.Field(coerce=True, description="Department Code", alias="code")
|
|
45
41
|
description: Series[String] = pa.Field(coerce=True, description="Department Description", alias="description")
|
|
46
42
|
created_at: Series[DateTime] = pa.Field(coerce=True, description="Created At", alias="createdAt")
|
|
47
|
-
managers: Series[String] = pa.Field(coerce=True, description="List of managers", alias="managers")
|
|
43
|
+
managers: Series[String] = pa.Field(coerce=True, nullable=True, description="List of managers", alias="managers")
|
|
44
|
+
|
|
45
|
+
class _Annotation:
|
|
46
|
+
primary_key = "department_id"
|
|
48
47
|
|
|
49
48
|
class DepartmentCreate(BaseModel):
|
|
50
49
|
code: int = Field(..., ge=1, example=2, description="Department Code", alias="code")
|
|
@@ -56,36 +55,3 @@ class EmployeeDepartmentUpdate(BaseModel):
|
|
|
56
55
|
|
|
57
56
|
class Config:
|
|
58
57
|
primary_key = "departmentId"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
# ---------------------------
|
|
62
|
-
# SOAP Schemas (DebtorService)
|
|
63
|
-
# ---------------------------
|
|
64
|
-
class DepartmentMasterCreate(BaseModel):
|
|
65
|
-
"""Schema for creating a master department via SOAP API."""
|
|
66
|
-
debtor_id: int = Field(..., description="Debtor ID", alias="debtorId", example=34548)
|
|
67
|
-
code: int = Field(..., ge=1, description="Department Code", alias="code", example=101)
|
|
68
|
-
description: str = Field(..., min_length=1, max_length=200, description="Department Description", alias="description", example="Engineering")
|
|
69
|
-
|
|
70
|
-
class Config:
|
|
71
|
-
populate_by_name = True
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
class DepartmentMasterUpdate(BaseModel):
|
|
75
|
-
"""Schema for updating a master department via SOAP API."""
|
|
76
|
-
debtor_id: int = Field(..., description="Debtor ID", alias="debtorId", example=34548)
|
|
77
|
-
department_id: int = Field(..., description="Department ID", alias="departmentId", example=12345)
|
|
78
|
-
code: int = Field(..., ge=1, description="Department Code", alias="code", example=101)
|
|
79
|
-
description: str = Field(..., min_length=1, max_length=200, description="Department Description", alias="description", example="Engineering Updated")
|
|
80
|
-
|
|
81
|
-
class Config:
|
|
82
|
-
populate_by_name = True
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
class DepartmentMasterDelete(BaseModel):
|
|
86
|
-
"""Schema for deleting a master department via SOAP API."""
|
|
87
|
-
debtor_id: int = Field(..., description="Debtor ID", alias="debtorId", example=34548)
|
|
88
|
-
department_id: int = Field(..., description="Department ID to delete", alias="departmentId", example=12345)
|
|
89
|
-
|
|
90
|
-
class Config:
|
|
91
|
-
populate_by_name = True
|
|
@@ -4,10 +4,8 @@ from typing import Optional
|
|
|
4
4
|
|
|
5
5
|
class DocumentUpload(BaseModel):
|
|
6
6
|
"""Schema for uploading a document to an employee via SOAP API."""
|
|
7
|
-
employee_id: int = Field(..., description="Employee ID", alias="employeeId", example=276967)
|
|
8
7
|
document_name: str = Field(..., description="Document name (with extension)", alias="documentName", example="contract.pdf")
|
|
9
8
|
document_type_guid: str = Field(..., description="Document type GUID", alias="documentTypeGuid", example="00000000-0000-0000-0000-000000000000")
|
|
10
9
|
|
|
11
10
|
class Config:
|
|
12
11
|
populate_by_name = True
|
|
13
|
-
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
from typing import Literal, Optional
|
|
2
|
+
|
|
3
|
+
import pandas as pd
|
|
4
|
+
import pandera as pa
|
|
5
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
6
|
+
|
|
7
|
+
from brynq_sdk_functions import BrynQPanderaDataFrameModel
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# ---------------------------
|
|
11
|
+
# Get Schemas - Employee Wage Tax Settings
|
|
12
|
+
# ---------------------------
|
|
13
|
+
class EmployeeWageTaxSettingsGet(BrynQPanderaDataFrameModel):
|
|
14
|
+
"""Schema for validating employee wage tax settings data."""
|
|
15
|
+
employee_id: pd.StringDtype = pa.Field(coerce=True, description="Employee ID", alias="employeeId")
|
|
16
|
+
wage_tax_settings_id: pd.StringDtype = pa.Field(coerce=True, nullable=True, description="Wage tax settings ID", alias="wageTaxSettingsId")
|
|
17
|
+
wage_tax: pd.BooleanDtype = pa.Field(coerce=True, nullable=True, description="Wage tax", alias="wageTax")
|
|
18
|
+
wage_tax_rebate: pd.BooleanDtype = pa.Field(coerce=True, nullable=True, description="Wage tax rebate (Loonheffingskorting)", alias="wageTaxRebate")
|
|
19
|
+
single_elderly_discount: pd.BooleanDtype = pa.Field(coerce=True, nullable=True, description="Single elderly discount", alias="singleElderlyDiscount")
|
|
20
|
+
color_table: pd.StringDtype = pa.Field(coerce=True, nullable=True, description="Color table (White/Green)", alias="colorTable")
|
|
21
|
+
period_table: pd.StringDtype = pa.Field(coerce=True, nullable=True, description="Period table (Month/Week/4Week/Day)", alias="periodTable")
|
|
22
|
+
income_type: pd.StringDtype = pa.Field(coerce=True, nullable=True, description="Income type", alias="incomeType")
|
|
23
|
+
special_annual_salary_rate: pd.Float64Dtype = pa.Field(coerce=True, nullable=True, description="Special annual salary rate (Loonheffing BT)", alias="specialAnnualSalaryRate")
|
|
24
|
+
special_table: pd.StringDtype = pa.Field(coerce=True, nullable=True, description="Special table", alias="specialTable")
|
|
25
|
+
different_special_rate: pd.StringDtype = pa.Field(coerce=True, nullable=True, description="Different special rate (Afwijkend Bijzonder tarief %)", alias="differentSpecialRate")
|
|
26
|
+
period_year: pd.Int64Dtype = pa.Field(coerce=True, nullable=True, description="Period year", alias="period.year")
|
|
27
|
+
period_period: pd.Int64Dtype = pa.Field(coerce=True, nullable=True, description="Period", alias="period.period")
|
|
28
|
+
created_at: str = pa.Field(coerce=True, nullable=True, description="Created at", alias="createdAt")
|
|
29
|
+
|
|
30
|
+
class _Annotation:
|
|
31
|
+
primary_key = "wage_tax_settings_id"
|
|
32
|
+
foreign_keys = {
|
|
33
|
+
"employee_id": {
|
|
34
|
+
"parent_schema": "EmployeeSchema",
|
|
35
|
+
"parent_column": "employee_id",
|
|
36
|
+
"cardinality": "1:N"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
# ---------------------------
|
|
42
|
+
# Create/Update Schemas
|
|
43
|
+
# ---------------------------
|
|
44
|
+
class Period(BaseModel):
|
|
45
|
+
"""Period model for specifying year and period."""
|
|
46
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
47
|
+
|
|
48
|
+
year: int = Field(..., ge=1900, le=2100, example=2021, description="Year", alias="year")
|
|
49
|
+
period: int = Field(..., ge=1, le=53, example=4, description="Period", alias="period")
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class Calc30PercentRuling(BaseModel):
|
|
53
|
+
"""30 percent ruling settings."""
|
|
54
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
55
|
+
|
|
56
|
+
cal_30_percent_ruling: Optional[str] = Field(None, example="None", description="30% ruling type", alias="Cal30PercentRuling")
|
|
57
|
+
end_period: Optional[int] = Field(None, ge=1, le=53, example=12, description="End period", alias="endPeriod")
|
|
58
|
+
end_year: Optional[int] = Field(None, ge=1900, le=2100, example=2025, description="End year", alias="endYear")
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
class EmployeeWageTaxSettingsCreate(BaseModel):
|
|
62
|
+
"""Schema for creating employee wage tax settings."""
|
|
63
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
64
|
+
|
|
65
|
+
wage_tax: bool = Field(..., example=True, description="Wage tax", alias="wageTax")
|
|
66
|
+
wage_tax_rebate: bool = Field(..., example=True, description="Wage tax rebate (Loonheffingskorting)", alias="wageTaxRebate")
|
|
67
|
+
single_elderly_discount: bool = Field(..., example=False, description="Single elderly discount", alias="singleElderlyDiscount")
|
|
68
|
+
color_table: Literal["White", "Green"] = Field(..., example="White", description="Color table", alias="colorTable")
|
|
69
|
+
period_table: Literal["Month", "Week", "4Week", "Day"] = Field(..., example="Month", description="Period table", alias="periodTable")
|
|
70
|
+
income_type: str = Field(..., example="11", description="Income type", alias="incomeType")
|
|
71
|
+
special_annual_salary_rate: Optional[float] = Field(None, example=0.0, description="Special annual salary rate (Loonheffing BT)", alias="specialAnnualSalaryRate")
|
|
72
|
+
special_table: str = Field(..., example="None", description="Special table", alias="specialTable")
|
|
73
|
+
different_special_rate: Optional[float] = Field(None, example=0.0, description="Different special rate (Afwijkend Bijzonder tarief %)", alias="differentSpecialRate")
|
|
74
|
+
calc_30_percent_ruling: Optional[Calc30PercentRuling] = Field(None, example={"Cal30PercentRuling": "None", "endPeriod": 12, "endYear": 2025}, description="30% ruling settings", alias="Calc30PercentRuling")
|
|
75
|
+
period: Period = Field(..., example={"year": 2021, "period": 4}, description="Period to apply settings")
|
|
@@ -132,10 +132,12 @@ class CreateEmployeePersonalInfo(BaseModel):
|
|
|
132
132
|
created_at: Optional[str] = Field(None, example="2021-07-01T10:15:08Z", description="Created At", alias="createdAt")
|
|
133
133
|
|
|
134
134
|
class EmployeeCreate(BaseModel):
|
|
135
|
+
company_id: str = Field(..., description="Company identifier", alias="companyId")
|
|
135
136
|
personal_info: CreateEmployeePersonalInfo = Field(..., alias="personalInfo")
|
|
136
137
|
additional_employee_info: AdditionalEmployeeInfo = Field(..., alias="additionalEmployeeInfo")
|
|
137
138
|
|
|
138
139
|
class EmployeeUpdate(BaseModel):
|
|
140
|
+
employee_id: str = Field(..., description="Employee identifier", alias="employeeId")
|
|
139
141
|
basic_info: Optional[BasicInfoUpdate] = Field(None, alias="basicInfo")
|
|
140
142
|
birth_info: Optional[BirthInfo] = Field(None, alias="birthInfo")
|
|
141
143
|
contact_info: Optional[ContactInfo] = Field(None, alias="contactInfo")
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import pandas as pd
|
|
2
|
+
import pandera as pa
|
|
3
|
+
from brynq_sdk_functions import BrynQPanderaDataFrameModel
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
# ---------------------------
|
|
7
|
+
# Get Schemas - Company Extra Field Settings
|
|
8
|
+
# ---------------------------
|
|
9
|
+
class ExtraFieldSettingsGet(BrynQPanderaDataFrameModel):
|
|
10
|
+
"""Schema for validating company extra field settings data."""
|
|
11
|
+
extra_field_id: pd.StringDtype = pa.Field(coerce=True, description="Extra field ID", alias="extraFieldId")
|
|
12
|
+
name: pd.StringDtype = pa.Field(coerce=True, nullable=True, description="Extra field name", alias="name")
|
|
13
|
+
extra_field_type: pd.StringDtype = pa.Field(
|
|
14
|
+
coerce=True,
|
|
15
|
+
nullable=True,
|
|
16
|
+
isin=["text", "decimal", "number", "date", "yesNo", "textDate"],
|
|
17
|
+
description="Extra field type",
|
|
18
|
+
alias="extraFieldType"
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
class _Annotation:
|
|
22
|
+
primary_key = "extra_field_id"
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# ---------------------------
|
|
26
|
+
# Get Schemas - Employee Extra Fields
|
|
27
|
+
# ---------------------------
|
|
28
|
+
class EmployeeExtraFieldsGet(BrynQPanderaDataFrameModel):
|
|
29
|
+
"""Schema for validating employee extra fields data."""
|
|
30
|
+
employee_id: pd.StringDtype = pa.Field(coerce=True, description="Employee ID", alias="employeeId")
|
|
31
|
+
extra_field_id: pd.StringDtype = pa.Field(coerce=True, nullable=True, description="Extra field ID", alias="extraField.extraFieldId")
|
|
32
|
+
extra_field_name: pd.StringDtype = pa.Field(coerce=True, nullable=True, description="Extra field name", alias="extraField.name")
|
|
33
|
+
extra_field_type: pd.StringDtype = pa.Field(
|
|
34
|
+
coerce=True,
|
|
35
|
+
nullable=True,
|
|
36
|
+
isin=["text", "decimal", "number", "date", "yesNo", "textDate"],
|
|
37
|
+
description="Extra field type",
|
|
38
|
+
alias="extraField.extraFieldType"
|
|
39
|
+
)
|
|
40
|
+
value: pd.StringDtype = pa.Field(coerce=True, nullable=True, description="Field value", alias="value")
|
|
41
|
+
start_date: str = pa.Field(coerce=True, nullable=True, description="Start date", alias="startDate")
|
|
42
|
+
|
|
43
|
+
class _Annotation:
|
|
44
|
+
primary_key = "extra_field_id"
|
|
45
|
+
foreign_keys = {
|
|
46
|
+
"employee_id": {
|
|
47
|
+
"parent_schema": "EmployeeSchema",
|
|
48
|
+
"parent_column": "employee_id",
|
|
49
|
+
"cardinality": "1:N"
|
|
50
|
+
},
|
|
51
|
+
"extra_field_id": {
|
|
52
|
+
"parent_schema": "ExtraFieldSettingsGet",
|
|
53
|
+
"parent_column": "extra_field_id",
|
|
54
|
+
"cardinality": "N:1"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
from datetime import datetime
|
|
2
|
-
from typing import Optional
|
|
3
2
|
|
|
4
3
|
import pandas as pd
|
|
5
4
|
import pandera as pa
|
|
6
|
-
|
|
7
|
-
from pandera.typing import DateTime, Float, Series, String
|
|
5
|
+
from pandera.typing import Series
|
|
8
6
|
from pydantic import BaseModel, Field
|
|
9
7
|
|
|
10
8
|
from brynq_sdk_functions import BrynQPanderaDataFrameModel
|
|
@@ -44,34 +42,9 @@ class FunctionGet(BrynQPanderaDataFrameModel):
|
|
|
44
42
|
code: Series[pd.Int64Dtype] = pa.Field(coerce=True, description="Function Code", alias="code")
|
|
45
43
|
description: Series[pa.String] = pa.Field(coerce=True, description="Function Description", alias="description")
|
|
46
44
|
|
|
45
|
+
class _Annotation:
|
|
46
|
+
primary_key = "function_id"
|
|
47
|
+
|
|
47
48
|
class FunctionUpdate(BaseModel):
|
|
48
49
|
function_id: str = Field(..., example="5981", description="Function ID", alias="functionId")
|
|
49
|
-
period_details: Period = Field(..., alias="periodDetails")
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
# SOAP Schemas for DebtorService Functions
|
|
53
|
-
class FunctionCreate(BaseModel):
|
|
54
|
-
"""Schema for creating a master function via SOAP API."""
|
|
55
|
-
code: int = Field(..., example=101, description="Function Code", alias="code")
|
|
56
|
-
description: str = Field(..., example="Software Developer", description="Function Description", alias="description")
|
|
57
|
-
|
|
58
|
-
class Config:
|
|
59
|
-
populate_by_name = True
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
class FunctionDelete(BaseModel):
|
|
63
|
-
"""Schema for deleting a master function via SOAP API."""
|
|
64
|
-
function_id: int = Field(..., example=12345, description="Function ID to delete", alias="functionId")
|
|
65
|
-
|
|
66
|
-
class Config:
|
|
67
|
-
populate_by_name = True
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
class FunctionMasterUpdate(BaseModel):
|
|
71
|
-
"""Schema for updating a master function via SOAP API."""
|
|
72
|
-
function_id: int = Field(..., example=12345, description="Function ID", alias="functionId")
|
|
73
|
-
code: int = Field(..., example=101, description="Function Code", alias="code")
|
|
74
|
-
description: str = Field(..., example="Senior Software Developer", description="Function Description", alias="description")
|
|
75
|
-
|
|
76
|
-
class Config:
|
|
77
|
-
populate_by_name = True
|
|
50
|
+
period_details: Period = Field(..., example={"year": 2021, "period": 4}, description="Period details", alias="periodDetails")
|
brynq_sdk_nmbrs/schemas/hours.py
CHANGED
|
@@ -76,6 +76,7 @@ class PeriodPost(BaseModel):
|
|
|
76
76
|
unprotected_mode: Optional[bool] = Field(None, example=False, description="Unprotected Mode", alias="unprotectedMode")
|
|
77
77
|
|
|
78
78
|
class FixedHoursCreate(BaseModel):
|
|
79
|
+
employee_id: str = Field(..., description="Employee identifier", alias="employeeId")
|
|
79
80
|
hour_code: int = Field(..., ge=1, example=2100, description="Hour Code", alias="hourCode")
|
|
80
81
|
number_of_hours: float = Field(..., ge=0, le=1000, example=40, description="Hours", alias="hours")
|
|
81
82
|
cost_center_id: Optional[str] = Field(None, example="aa506564-d1db-4fa8-83dc-d68db4cfcd82", description="Cost Center ID", alias="costCenterId")
|
|
@@ -86,6 +87,7 @@ class FixedHoursCreate(BaseModel):
|
|
|
86
87
|
period_details: Optional[PeriodPost] = None
|
|
87
88
|
|
|
88
89
|
class FixedHoursUpdate(BaseModel):
|
|
90
|
+
employee_id: str = Field(..., description="Employee identifier", alias="employeeId")
|
|
89
91
|
hour_component_id: str = Field(..., example="ddaae291-47fa-4c67-bb2f-de0e5da9e8a1", description="Hour Component ID", alias="hourComponentId")
|
|
90
92
|
hour_code: Optional[int] = Field(None, ge=1, example=2100, description="Hour Code", alias="hourCode")
|
|
91
93
|
number_of_hours: Optional[float] = Field(None, ge=0, le=1000, example=40, description="Hours", alias="hours")
|
|
@@ -97,14 +99,16 @@ class FixedHoursUpdate(BaseModel):
|
|
|
97
99
|
period_details: Optional[PeriodPost] = None
|
|
98
100
|
|
|
99
101
|
class VariableHoursCreate(BaseModel):
|
|
102
|
+
employee_id: str = Field(..., example="3054d4cf-b449-489d-8d2e-5dd30e5ab994", description="Employee identifier", alias="employeeId")
|
|
100
103
|
hour_code: int = Field(..., ge=1, example=2100, description="Hour Code", alias="hourCode")
|
|
101
104
|
number_of_hours: float = Field(..., ge=0, le=1000, example=3.5, description="Hours", alias="hours")
|
|
102
105
|
cost_center_id: Optional[str] = Field(None, example="aa506564-d1db-4fa8-83dc-d68db4cfcd82", description="Cost Center ID", alias="costCenterId")
|
|
103
106
|
cost_unit_id: Optional[str] = Field(None, example="d8ac6afb-2ac6-43bf-9880-2d382cdace43", description="Cost Unit ID", alias="costUnitId")
|
|
104
107
|
comment: Optional[str] = Field(None, example="Shift hours", description="Comment", alias="comment")
|
|
105
|
-
period_details: Optional[PeriodPost] = Field(None, example="
|
|
108
|
+
period_details: Optional[PeriodPost] = Field(None, example={"period": {"year": 2025, "period": 1}, "unprotectedMode": False}, description="Period details", alias="periodDetails")
|
|
106
109
|
|
|
107
110
|
class VariableHoursUpdate(BaseModel):
|
|
111
|
+
employee_id: str = Field(..., description="Employee identifier", alias="employeeId")
|
|
108
112
|
hour_component_id: str = Field(..., example="49a69eda-252e-4ccb-a220-38ea90511d4f", description="Hour Component ID", alias="hourComponentId")
|
|
109
113
|
hour_code: Optional[int] = Field(None, ge=1, example=2100, description="Hour Code", alias="hourCode")
|
|
110
114
|
number_of_hours: Optional[float] = Field(None, ge=0, le=1000, example=45.5, description="Hours", alias="hours")
|
brynq_sdk_nmbrs/schemas/leave.py
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
from enum import Enum
|
|
3
|
+
from typing import Annotated, Optional
|
|
4
|
+
|
|
1
5
|
import pandas as pd
|
|
2
6
|
import pandera as pa
|
|
3
|
-
from pandera.typing import Series, String, Float, DateTime
|
|
4
7
|
import pandera.extensions as extensions
|
|
5
|
-
from
|
|
6
|
-
from typing import Optional, Annotated
|
|
8
|
+
from pandera.typing import DateTime, Float, Series, String
|
|
7
9
|
from pydantic import BaseModel, Field, StringConstraints
|
|
8
|
-
|
|
9
|
-
from
|
|
10
|
+
|
|
11
|
+
from brynq_sdk_functions import BrynQPanderaDataFrameModel
|
|
10
12
|
|
|
11
13
|
|
|
12
14
|
class LeaveGet(BrynQPanderaDataFrameModel):
|
|
@@ -48,7 +50,6 @@ class LeaveDelete(BaseModel):
|
|
|
48
50
|
|
|
49
51
|
class LeaveUpdate(BaseModel):
|
|
50
52
|
"""Schema for updating leave via SOAP API."""
|
|
51
|
-
employee_id: int = Field(..., example=12345, description="Employee ID", alias="employeeId")
|
|
52
53
|
leave_id: int = Field(..., example=67890, description="Leave ID", alias="leaveId")
|
|
53
54
|
start_date: datetime = Field(..., example="2025-01-01T00:00:00", description="Leave Start Date", alias="startDate")
|
|
54
55
|
end_date: datetime = Field(..., example="2025-01-02T00:00:00", description="Leave End Date", alias="endDate")
|
|
@@ -62,3 +63,13 @@ class LeaveBalanceGet(BrynQPanderaDataFrameModel):
|
|
|
62
63
|
employee_id: Series[String] = pa.Field(coerce=True, description="Employee ID", alias="employeeId")
|
|
63
64
|
leave_group_id: Series[String] = pa.Field(coerce=True, nullable=True, description="Leave Group ID", alias="leaveGroupId")
|
|
64
65
|
balance: Series[Float] = pa.Field(coerce=True, nullable=True, description="Leave Balance", alias="leaveBalance")
|
|
66
|
+
|
|
67
|
+
class _Annotation:
|
|
68
|
+
primary_key = "employee_id"
|
|
69
|
+
foreign_keys = {
|
|
70
|
+
"leave_group_id": {
|
|
71
|
+
"parent_schema": "LeaveGroupGet",
|
|
72
|
+
"parent_column": "leave_group_id",
|
|
73
|
+
"cardinality": "N:1"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -3,9 +3,8 @@ from typing import Optional
|
|
|
3
3
|
|
|
4
4
|
import pandas as pd
|
|
5
5
|
import pandera as pa
|
|
6
|
-
|
|
7
|
-
from
|
|
8
|
-
from pydantic import BaseModel, Field
|
|
6
|
+
from pandera.typing import Series
|
|
7
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
9
8
|
|
|
10
9
|
from brynq_sdk_functions import BrynQPanderaDataFrameModel
|
|
11
10
|
|
|
@@ -47,25 +46,10 @@ class ManagerBasicGet(BrynQPanderaDataFrameModel):
|
|
|
47
46
|
class EmployeeManagerGet(BrynQPanderaDataFrameModel):
|
|
48
47
|
employee_id: Series[pa.String] = pa.Field(coerce=True, description="Employee ID", alias="employeeId")
|
|
49
48
|
manager_id: Series[pa.String] = pa.Field(coerce=True, description="Manager ID", alias="managerId")
|
|
50
|
-
manager_number: Series[pd.Int64Dtype] = pa.Field(coerce=True, description="Manager number", alias="number")
|
|
51
49
|
manager_first_name: Series[pa.String] = pa.Field(coerce=True, description="Manager first name", alias="firstName")
|
|
52
50
|
manager_last_name: Series[pa.String] = pa.Field(coerce=True, description="Manager last name", alias="lastName")
|
|
53
|
-
manager_gender: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="Manager gender", alias="gender")
|
|
54
|
-
manager_phone_number: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="Manager phone number", alias="phoneNumber")
|
|
55
|
-
manager_cellphone: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="Manager cellphone", alias="cellphone")
|
|
56
|
-
manager_fax: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="Manager fax", alias="fax")
|
|
57
51
|
manager_email: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="Manager email", alias="email")
|
|
58
52
|
created_at: Series[datetime] = pa.Field(coerce=True, description="Manager created at", alias="createdAt")
|
|
59
|
-
period_period: Series[pd.Int64Dtype] = pa.Field(coerce=True, description="Period", alias="period.period")
|
|
60
|
-
period_year: Series[pd.Int64Dtype] = pa.Field(coerce=True, description="Year", alias="period.year")
|
|
61
|
-
manager_department_id: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="Department ID", alias="department.departmentId")
|
|
62
|
-
manager_department_code: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=True, description="Department Code", alias="department.code")
|
|
63
|
-
manager_department_description: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="Department Description", alias="department.description")
|
|
64
|
-
manager_department_created_at: Series[datetime] = pa.Field(coerce=True, nullable=True, description="Department Created At", alias="department.createdAt")
|
|
65
|
-
manager_function_id: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="Function ID", alias="function.functionId")
|
|
66
|
-
manager_function_code: Series[pd.Int64Dtype] = pa.Field(coerce=True, nullable=True, description="Function Code", alias="function.code")
|
|
67
|
-
manager_function_description: Series[pa.String] = pa.Field(coerce=True, nullable=True, description="Function Description", alias="function.description")
|
|
68
|
-
function_created_at: Series[datetime] = pa.Field(coerce=True, nullable=True, description="Function Created At", alias="function.createdAt")
|
|
69
53
|
|
|
70
54
|
class _Annotation:
|
|
71
55
|
primary_key = "manager_id"
|
|
@@ -99,10 +83,13 @@ class ManagerHistoricBasicGet(BrynQPanderaDataFrameModel):
|
|
|
99
83
|
# Upload Schemas
|
|
100
84
|
# ---------------------------
|
|
101
85
|
class Period(BaseModel):
|
|
86
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
102
87
|
year: int = Field(..., ge=1900, le=2100, example=2021, description="Year", alias="year")
|
|
103
88
|
period: int = Field(..., ge=1, le=53, example=4, description="Period", alias="period")
|
|
104
89
|
|
|
105
90
|
class ManagerCreate(BaseModel):
|
|
91
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
92
|
+
debtor_id: str = Field(..., description="Debtor identifier", alias="debtorId")
|
|
106
93
|
number: int = Field(..., ge=1, example=1, description="Manager number", alias="number")
|
|
107
94
|
first_name: str = Field(..., max_length=100, example="John", description="Manager first name", alias="firstName")
|
|
108
95
|
last_name: str = Field(..., max_length=100, example="Doe", description="Manager last name", alias="lastName")
|
|
@@ -113,12 +100,16 @@ class ManagerCreate(BaseModel):
|
|
|
113
100
|
email: Optional[str] = Field(None, max_length=100, example="john.doe@company.com", description="Manager email", alias="email")
|
|
114
101
|
|
|
115
102
|
class ManagerUpdate(BaseModel):
|
|
103
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
104
|
+
debtor_id: str = Field(..., example="a1b2c3d4-e5f6-7890-abcd-ef1234567890", description="Debtor identifier", alias="debtorId")
|
|
116
105
|
manager_id: str = Field(..., example="2f6aa11c-504a-49a1-903b-e15e79965702", description="Manager ID", alias="managerId")
|
|
117
|
-
period_details: Period = Field(..., alias="periodDetails")
|
|
106
|
+
period_details: Period = Field(..., example={"year": 2021, "period": 4}, description="Period details", alias="periodDetails")
|
|
118
107
|
|
|
119
108
|
class ManagerDelete(BaseModel):
|
|
109
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
120
110
|
manager_id: str = Field(..., example="2f6aa11c-504a-49a1-903b-e15e79965702", description="Manager ID", alias="managerId")
|
|
121
111
|
|
|
122
112
|
class UpdateEmployeeManager(BaseModel):
|
|
113
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
123
114
|
manager_id: str = Field(..., example="2f6aa11c-504a-49a1-903b-e15e79965702", description="Manager ID", alias="managerId")
|
|
124
|
-
period_details: Period = Field(..., alias="periodDetails")
|
|
115
|
+
period_details: Period = Field(..., example={"year": 2021, "period": 4}, description="Period details", alias="periodDetails")
|
|
@@ -29,7 +29,8 @@ class SalaryGet(BrynQPanderaDataFrameModel):
|
|
|
29
29
|
"netParttimeSalaryExclWageComp",
|
|
30
30
|
"netHourlyWageExclWageComp",
|
|
31
31
|
"netHourlyWageInclWageComp",
|
|
32
|
-
"employerCosts"
|
|
32
|
+
"employerCosts",
|
|
33
|
+
"0"
|
|
33
34
|
],
|
|
34
35
|
description="Salary Type",
|
|
35
36
|
alias="type"
|
|
@@ -100,6 +101,9 @@ class SalaryTableGet(BrynQPanderaDataFrameModel):
|
|
|
100
101
|
guid_salary_table: Series[String] = pa.Field(coerce=True, description="GUID Salary table", alias="GuidSalaryTable")
|
|
101
102
|
company_id: Series[String] = pa.Field(coerce=True, description="Company ID", alias="companyId")
|
|
102
103
|
|
|
104
|
+
class _Annotation:
|
|
105
|
+
primary_key = "guid_salary_table"
|
|
106
|
+
|
|
103
107
|
class SalaryScalesGet(BrynQPanderaDataFrameModel):
|
|
104
108
|
scale: Series[String] = pa.Field(coerce=True, description="Salary Scale", alias="Scale")
|
|
105
109
|
description: Series[String] = pa.Field(coerce=True, description="Salary Scale Description", alias="SchaalDescription")
|
|
@@ -109,9 +113,15 @@ class SalaryScalesGet(BrynQPanderaDataFrameModel):
|
|
|
109
113
|
guid_salary_table_scale: Series[String] = pa.Field(coerce=True, description="GUID Salary table scale", alias="GuidSalaryTableScale")
|
|
110
114
|
company_id: Series[String] = pa.Field(coerce=True, description="Company ID", alias="companyId")
|
|
111
115
|
|
|
116
|
+
class _Annotation:
|
|
117
|
+
primary_key = "guid_salary_table_scale"
|
|
118
|
+
|
|
112
119
|
class SalaryStepsGet(BrynQPanderaDataFrameModel):
|
|
113
120
|
step: Series[String] = pa.Field(coerce=True, description="Salary Step", alias="Step")
|
|
114
121
|
step_description: Series[String] = pa.Field(coerce=True, description="Salary Step Description", alias="StepDescription")
|
|
115
122
|
step_value: Series[String] = pa.Field(coerce=True, description="Salary Step Value", alias="StepValue")
|
|
116
123
|
guid_salary_table_step: Series[String] = pa.Field(coerce=True, description="GUID Salary Step table", alias="GuidSalaryTableStep")
|
|
117
124
|
company_id: Series[String] = pa.Field(coerce=True, description="Company ID", alias="companyId")
|
|
125
|
+
|
|
126
|
+
class _Annotation:
|
|
127
|
+
primary_key = "guid_salary_table_step"
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
from datetime import datetime
|
|
2
|
-
from typing import
|
|
2
|
+
from typing import Optional
|
|
3
3
|
|
|
4
|
-
import pandas as pd
|
|
5
4
|
import pandera as pa
|
|
6
|
-
|
|
7
|
-
from pandera import Bool, Int
|
|
8
|
-
from pandera.typing import DateTime, Float, Series, String
|
|
5
|
+
from pandera.typing import Float, Series, String
|
|
9
6
|
from pydantic import BaseModel, Field
|
|
10
7
|
|
|
11
8
|
from brynq_sdk_functions import BrynQPanderaDataFrameModel
|
|
@@ -109,52 +106,3 @@ class ScheduleCreate(BaseModel):
|
|
|
109
106
|
}
|
|
110
107
|
}
|
|
111
108
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
class ScheduleUpdate(BaseModel):
|
|
115
|
-
"""
|
|
116
|
-
Pydantic model for updating a schedule via SOAP API
|
|
117
|
-
"""
|
|
118
|
-
employee_id: int = Field(..., example=12345, description="Employee ID", alias="employeeId")
|
|
119
|
-
start_date: datetime = Field(..., example="2025-01-01T00:00:00", description="Start date of the schedule", alias="startDate")
|
|
120
|
-
parttime_percentage: float = Field(..., ge=0, le=100, example=100.0, description="Part-time percentage", alias="parttimePercentage")
|
|
121
|
-
company_rooster_nr: Optional[int] = Field(0, example=0, description="Company Rooster Number (schedule template)", alias="companyRoosterNr")
|
|
122
|
-
hours_monday: Optional[float] = Field(0, ge=0, le=24, example=8.0, description="Hours Monday", alias="hoursMonday")
|
|
123
|
-
hours_tuesday: Optional[float] = Field(0, ge=0, le=24, example=8.0, description="Hours Tuesday", alias="hoursTuesday")
|
|
124
|
-
hours_wednesday: Optional[float] = Field(0, ge=0, le=24, example=8.0, description="Hours Wednesday", alias="hoursWednesday")
|
|
125
|
-
hours_thursday: Optional[float] = Field(0, ge=0, le=24, example=8.0, description="Hours Thursday", alias="hoursThursday")
|
|
126
|
-
hours_friday: Optional[float] = Field(0, ge=0, le=24, example=8.0, description="Hours Friday", alias="hoursFriday")
|
|
127
|
-
hours_saturday: Optional[float] = Field(0, ge=0, le=24, example=0.0, description="Hours Saturday", alias="hoursSaturday")
|
|
128
|
-
hours_sunday: Optional[float] = Field(0, ge=0, le=24, example=0.0, description="Hours Sunday", alias="hoursSunday")
|
|
129
|
-
hours_monday2: Optional[float] = Field(0, ge=0, le=24, example=8.0, description="Hours Monday Week 2", alias="hoursMonday2")
|
|
130
|
-
hours_tuesday2: Optional[float] = Field(0, ge=0, le=24, example=8.0, description="Hours Tuesday Week 2", alias="hoursTuesday2")
|
|
131
|
-
hours_wednesday2: Optional[float] = Field(0, ge=0, le=24, example=8.0, description="Hours Wednesday Week 2", alias="hoursWednesday2")
|
|
132
|
-
hours_thursday2: Optional[float] = Field(0, ge=0, le=24, example=8.0, description="Hours Thursday Week 2", alias="hoursThursday2")
|
|
133
|
-
hours_friday2: Optional[float] = Field(0, ge=0, le=24, example=8.0, description="Hours Friday Week 2", alias="hoursFriday2")
|
|
134
|
-
hours_saturday2: Optional[float] = Field(0, ge=0, le=24, example=0.0, description="Hours Saturday Week 2", alias="hoursSaturday2")
|
|
135
|
-
hours_sunday2: Optional[float] = Field(0, ge=0, le=24, example=0.0, description="Hours Sunday Week 2", alias="hoursSunday2")
|
|
136
|
-
|
|
137
|
-
def to_soap_schedule(self, soap_client):
|
|
138
|
-
"""Convert to SOAP Schedule object"""
|
|
139
|
-
ScheduleType = soap_client.get_type('ns0:Schedule')
|
|
140
|
-
return ScheduleType(
|
|
141
|
-
StartDate=self.start_date,
|
|
142
|
-
ParttimePercentage=self.parttime_percentage,
|
|
143
|
-
HoursMonday=self.hours_monday or 0,
|
|
144
|
-
HoursTuesday=self.hours_tuesday or 0,
|
|
145
|
-
HoursWednesday=self.hours_wednesday or 0,
|
|
146
|
-
HoursThursday=self.hours_thursday or 0,
|
|
147
|
-
HoursFriday=self.hours_friday or 0,
|
|
148
|
-
HoursSaturday=self.hours_saturday or 0,
|
|
149
|
-
HoursSunday=self.hours_sunday or 0,
|
|
150
|
-
HoursMonday2=self.hours_monday2 or 0,
|
|
151
|
-
HoursTuesday2=self.hours_tuesday2 or 0,
|
|
152
|
-
HoursWednesday2=self.hours_wednesday2 or 0,
|
|
153
|
-
HoursThursday2=self.hours_thursday2 or 0,
|
|
154
|
-
HoursFriday2=self.hours_friday2 or 0,
|
|
155
|
-
HoursSaturday2=self.hours_saturday2 or 0,
|
|
156
|
-
HoursSunday2=self.hours_sunday2 or 0
|
|
157
|
-
)
|
|
158
|
-
|
|
159
|
-
class Config:
|
|
160
|
-
populate_by_name = True
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
import pandas as pd
|
|
4
|
+
import pandera as pa
|
|
5
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
6
|
+
|
|
7
|
+
from brynq_sdk_functions import BrynQPanderaDataFrameModel
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# ---------------------------
|
|
11
|
+
# Get Schemas - Company SVW Settings
|
|
12
|
+
# ---------------------------
|
|
13
|
+
class CompanySVWSettingsGet(BrynQPanderaDataFrameModel):
|
|
14
|
+
"""Schema for validating company SVW settings data."""
|
|
15
|
+
svw_settings_id: pd.StringDtype = pa.Field(coerce=True, description="SVW Settings ID", alias="SVWSettingsId")
|
|
16
|
+
own_risk_dif_wga: pd.BooleanDtype = pa.Field(coerce=True, nullable=True, description="Own risk DIF WGA", alias="ownRiskDifWGA")
|
|
17
|
+
own_risk_health_care: pd.BooleanDtype = pa.Field(coerce=True, nullable=True, description="Own risk health care", alias="ownRiskHealthCare")
|
|
18
|
+
aof: pd.StringDtype = pa.Field(coerce=True, nullable=True, description="AOF (Low/High)", alias="AOF")
|
|
19
|
+
diff_wga_wn: pd.Float64Dtype = pa.Field(coerce=True, nullable=True, description="Diff WGA Wn", alias="diffWGAWn")
|
|
20
|
+
diff_wga_wg: pd.Float64Dtype = pa.Field(coerce=True, nullable=True, description="Diff WGA Wg", alias="diffWGAWg")
|
|
21
|
+
zw_wg: pd.Float64Dtype = pa.Field(coerce=True, nullable=True, description="ZW Wg", alias="zwWg")
|
|
22
|
+
|
|
23
|
+
class _Annotation:
|
|
24
|
+
primary_key = "svw_settings_id"
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
# ---------------------------
|
|
28
|
+
# Get Schemas - Employee SVW Settings
|
|
29
|
+
# ---------------------------
|
|
30
|
+
class EmployeeSVWSettingsGet(BrynQPanderaDataFrameModel):
|
|
31
|
+
"""Schema for validating employee SVW settings data."""
|
|
32
|
+
employee_id: pd.StringDtype = pa.Field(coerce=True, description="Employee ID", alias="employeeId")
|
|
33
|
+
zw: pd.BooleanDtype = pa.Field(coerce=True, nullable=True, description="ZW (Ziektewet)", alias="ZW")
|
|
34
|
+
ww: pd.BooleanDtype = pa.Field(coerce=True, nullable=True, description="WW (Werkloosheidswet)", alias="WW")
|
|
35
|
+
wao_wia: pd.BooleanDtype = pa.Field(coerce=True, nullable=True, description="WAO/WIA", alias="waoWia")
|
|
36
|
+
nature_of_employment: pd.StringDtype = pa.Field(coerce=True, nullable=True, description="Nature of employment", alias="natureOfEmployment")
|
|
37
|
+
phase_classification: pd.StringDtype = pa.Field(coerce=True, nullable=True, description="Phase classification", alias="phaseClassification")
|
|
38
|
+
tax_sequence_number: pd.Int64Dtype = pa.Field(coerce=True, nullable=True, description="Tax sequence number", alias="taxSequenceNumber")
|
|
39
|
+
code_zvw: pd.StringDtype = pa.Field(coerce=True, nullable=True, description="Code ZVW", alias="codeZvw")
|
|
40
|
+
income_related_contribution_zvw: pd.StringDtype = pa.Field(coerce=True, nullable=True, description="Income related contribution ZVW", alias="incomeRelatedContributionZvw")
|
|
41
|
+
influence_obliged_insurance: pd.StringDtype = pa.Field(coerce=True, nullable=True, description="Influence obliged insurance", alias="influenceObligedInsurance")
|
|
42
|
+
wage_cost_benefit_code: pd.Int64Dtype = pa.Field(coerce=True, nullable=True, description="Wage cost benefit code", alias="wageCostBenefit.code")
|
|
43
|
+
wage_cost_benefit_description: pd.StringDtype = pa.Field(coerce=True, nullable=True, description="Wage cost benefit description", alias="wageCostBenefit.description")
|
|
44
|
+
wage_cost_benefit_end_period: pd.Int64Dtype = pa.Field(coerce=True, nullable=True, description="Wage cost benefit end period", alias="wageCostBenefit.endPeriod")
|
|
45
|
+
wage_cost_benefit_end_year: pd.Int64Dtype = pa.Field(coerce=True, nullable=True, description="Wage cost benefit end year", alias="wageCostBenefit.endYear")
|
|
46
|
+
cao_code: pd.Int64Dtype = pa.Field(coerce=True, nullable=True, description="CAO code", alias="CAO.code")
|
|
47
|
+
cao_description: pd.StringDtype = pa.Field(coerce=True, nullable=True, description="CAO description", alias="CAO.CAODescription")
|
|
48
|
+
hirer_cao_code: Optional[pd.Int64Dtype] = pa.Field(
|
|
49
|
+
coerce=True,
|
|
50
|
+
nullable=True,
|
|
51
|
+
description="Hirer CAO code",
|
|
52
|
+
alias="hirerCAO.code",
|
|
53
|
+
)
|
|
54
|
+
hirer_cao_description: Optional[pd.StringDtype] = pa.Field(
|
|
55
|
+
coerce=True,
|
|
56
|
+
nullable=True,
|
|
57
|
+
description="Hirer CAO description",
|
|
58
|
+
alias="hirerCAO.CAODescription",
|
|
59
|
+
)
|
|
60
|
+
period_year: pd.Int64Dtype = pa.Field(coerce=True, nullable=True, description="Period year", alias="period.year")
|
|
61
|
+
period_period: pd.Int64Dtype = pa.Field(coerce=True, nullable=True, description="Period", alias="period.period")
|
|
62
|
+
created_at: str = pa.Field(coerce=True, nullable=True, description="Created at", alias="createdAt")
|
|
63
|
+
|
|
64
|
+
class _Annotation:
|
|
65
|
+
primary_key = "employee_id"
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
# ---------------------------
|
|
69
|
+
# Create/Update Schemas
|
|
70
|
+
# ---------------------------
|
|
71
|
+
class Period(BaseModel):
|
|
72
|
+
"""Period model for specifying year and period."""
|
|
73
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
74
|
+
|
|
75
|
+
period_year: int = Field(..., ge=1900, le=2100, example=2021, description="Year", alias="year")
|
|
76
|
+
period_period: int = Field(..., ge=1, le=53, example=4, description="Period", alias="period")
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
class WageCostBenefit(BaseModel):
|
|
80
|
+
"""Wage cost benefit model."""
|
|
81
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
82
|
+
|
|
83
|
+
code: Optional[int] = Field(None, example=1234, description="Wage cost benefit code", alias="code")
|
|
84
|
+
end_period: Optional[int] = Field(None, ge=1, le=53, example=12, description="End period", alias="endPeriod")
|
|
85
|
+
end_year: Optional[int] = Field(None, ge=1900, le=2100, example=2025, description="End year", alias="endYear")
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class SVWSettingsCreate(BaseModel):
|
|
89
|
+
"""Schema for creating employee SVW settings."""
|
|
90
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
91
|
+
|
|
92
|
+
zw: Optional[bool] = Field(None, example=True, description="ZW (Ziektewet)", alias="ZW")
|
|
93
|
+
ww: Optional[bool] = Field(None, example=True, description="WW (Werkloosheidswet)", alias="WW")
|
|
94
|
+
wao_wia: Optional[bool] = Field(None, example=True, description="WAO/WIA", alias="waoWia")
|
|
95
|
+
nature_of_employment: int = Field(..., example=1, description="Nature of employment code (1, 4, 6, 7, 11, 18, 21, 22, 23, 24, 79, 81, 82, 83)", alias="natureOfEmployment")
|
|
96
|
+
phase_classification: Optional[int] = Field(None, example=1, description="Phase classification (only for nature of employment 11)", alias="phaseClassification")
|
|
97
|
+
code_zvw: str = Field(
|
|
98
|
+
...,
|
|
99
|
+
pattern=r'^[ABGHIKLMN]$',
|
|
100
|
+
example="A",
|
|
101
|
+
description="Code ZVW (A, B, G, H, I, K, L, M, N)",
|
|
102
|
+
alias="codeZvw",
|
|
103
|
+
)
|
|
104
|
+
tax_sequence_number: int = Field(..., ge=0, example=0, description="Tax sequence number", alias="taxSequenceNumber")
|
|
105
|
+
income_related_contribution_zvw: int = Field(..., ge=0, example=0, description="Income related contribution ZVW", alias="incomeRelatedContributionZvw")
|
|
106
|
+
influence_obliged_insurance: str = Field(
|
|
107
|
+
...,
|
|
108
|
+
pattern=r'^[0ABDE]$',
|
|
109
|
+
example="0",
|
|
110
|
+
description="Influence obliged insurance (0, A, B, D, E)",
|
|
111
|
+
alias="influenceObligedInsurance",
|
|
112
|
+
)
|
|
113
|
+
wage_cost_benefit: Optional[WageCostBenefit] = Field(None, example={"code": 1234, "endPeriod": 12, "endYear": 2025}, description="Wage cost benefit", alias="wageCostBenefit")
|
|
114
|
+
cao: Optional[int] = Field(None, example=100, description="CAO code", alias="CAO")
|
|
115
|
+
hirer_cao: Optional[int] = Field(None, example=100, description="Hirer CAO code", alias="hirerCAO")
|
|
116
|
+
period: Period = Field(..., example={"year": 2021, "period": 4}, description="Period to apply settings")
|