File size: 2,865 Bytes
ef1ad9e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
from pydantic import BaseModel, Field


class OnboardingProfileSchema(BaseModel):
    isWorkingWithAnyLoanOfficer: bool = Field(
        ..., example=True, description="Indicates if the user is working with any loan officer."
    )
    address: str = Field(
        "123 Main St, Springfield, IL", example="123 Main St, Springfield, IL", description="The address of the user."
    )
    lenderId: int = Field(1, example=1, description="The unique identifier of the lender.")
    loanPurposeId: int = Field(1, example=1, description="The purpose of the loan, represented by a unique identifier.")
    employmentTypeId: int = Field(1, example=1, description="The employment type, represented by a unique identifier.")
    statusId: int = Field(
        1, example=1, description="The status of the onboarding process, represented by a unique identifier."
    )
    pageNumber: int = Field(1, example=1, description="The current page number for pagination.")


class OnboardingProfileCreate(OnboardingProfileSchema):
    address: str | None = Field(None, example="123 Main St, Springfield, IL", description="The address of the user.")
    lenderId: int | None = Field(None, example=1, description="The unique identifier of the lender.")
    loanPurposeId: int | None = Field(
        None, example=1, description="The purpose of the loan, represented by a unique identifier."
    )
    employmentTypeId: int | None = Field(
        None, example=1, description="The employment type, represented by a unique identifier."
    )
    statusId: int | None = Field(
        None, example=1, description="The status of the onboarding process, represented by a unique identifier."
    )


class OnboardingProfileUpdate(OnboardingProfileSchema):
    isWorkingWithAnyLoanOfficer: bool | None = Field(
        None, example=True, description="Indicates if the user is working with any loan officer."
    )
    address: str | None = Field(None, example="123 Main St, Springfield, IL", description="The address of the user.")
    lenderId: int | None = Field(None, example=1, description="The unique identifier of the lender.")
    loanPurposeId: int | None = Field(
        None, example=1, description="The purpose of the loan, represented by a unique identifier."
    )
    employmentTypeId: int | None = Field(
        None, example=1, description="The employment type, represented by a unique identifier."
    )
    statusId: int | None = Field(
        None, example=1, description="The status of the onboarding process, represented by a unique identifier."
    )


class OnboardingProfileInDB(OnboardingProfileSchema):
    OnboardingId: int | None = Field(
        None, example=1, description="The unique identifier of the onboarding profile in the database."
    )

    class Config:
        from_attributes = True