|
| 1 | +from datetime import datetime |
| 2 | +from typing import List, Optional |
| 3 | + |
| 4 | +from pydantic import BaseModel, Field |
| 5 | + |
| 6 | + |
| 7 | +class ApplicantResponseVacancy(BaseModel): |
| 8 | + id: int = Field(..., description="Vacancy ID") |
| 9 | + position: str = Field(..., description="The name of the vacancy (occupation)") |
| 10 | + |
| 11 | + |
| 12 | +class ApplicantResponseVacancyExternal(BaseModel): |
| 13 | + id: int = Field(..., description="Publication ID") |
| 14 | + foreign: str = Field(..., description="Foreign publication ID (from job site)") |
| 15 | + |
| 16 | + |
| 17 | +class ApplicantResponse(BaseModel): |
| 18 | + id: int = Field(..., description="Response ID") |
| 19 | + foreign: str = Field(..., description="Foreign response ID (from job site)") |
| 20 | + created: datetime |
| 21 | + applicant_external: int = Field(..., description="Resume ID") |
| 22 | + vacancy: ApplicantResponseVacancy = Field(..., description="Vacancy") |
| 23 | + vacancy_external: ApplicantResponseVacancyExternal = Field( |
| 24 | + ..., |
| 25 | + description="Publication of a vacancy for which an applicant responded", |
| 26 | + ) |
| 27 | + |
| 28 | + |
| 29 | +class ApplicantResponsesListResponse(BaseModel): |
| 30 | + items: List[ApplicantResponse] = Field(..., description="List of applicant's responses") |
| 31 | + next_page_cursor: Optional[str] = Field(None, description="Next page cursor") |
0 commit comments