MIRA_LABS_AI / miralabs-backend /user-service /app /schema /onBoarding_profile_schema.py
ans123's picture
Initial upload from Colab
ef1ad9e verified
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