11
11
12
12
13
13
class ApplicantSocial (BaseModel ):
14
- id : int = Field (..., description = "Social ID" , example = 1 )
15
- social_type : str = Field (..., description = "Social type" , example = "TELEGRAM" )
16
- value : str = Field (..., description = "Social nick/email" , example = "test_tg" )
17
- verified : bool = Field (..., description = "Verification flag" , example = True )
14
+ id : int = Field (..., description = "Social ID" , examples = [ 1 ] )
15
+ social_type : str = Field (..., description = "Social type" , examples = [ "TELEGRAM" ] )
16
+ value : str = Field (..., description = "Social nick/email" , examples = [ "test_tg" ] )
17
+ verified : bool = Field (..., description = "Verification flag" , examples = [ True ] )
18
18
verification_date : Optional [datetime ] = Field (
19
19
None ,
20
20
description = "Verification datetime" ,
21
- example = datetime (1970 , 1 , 1 , 1 , 1 , 1 ),
21
+ examples = [ datetime (1970 , 1 , 1 , 1 , 1 , 1 )] ,
22
22
)
23
23
24
24
25
25
class ApplicantPDAgreement (BaseModel ):
26
26
state : Optional [AgreementState ] = Field (
27
27
None ,
28
28
description = "Agreement state" ,
29
- example = AgreementState .NOT_SENT ,
29
+ examples = [ AgreementState .NOT_SENT ] ,
30
30
)
31
31
decision_date : Optional [datetime ] = Field (
32
32
None ,
33
33
description = "Decision date" ,
34
- example = datetime (1970 , 1 , 1 , 1 , 1 , 1 ),
34
+ examples = [ datetime (1970 , 1 , 1 , 1 , 1 , 1 )] ,
35
35
)
36
36
37
37
38
38
class VacancyApplicantStatus (BaseModel ):
39
- id : int = Field (..., description = "Status ID" , example = 1 )
40
- name : str = Field (..., description = "Status name" , example = "hired" )
39
+ id : int = Field (..., description = "Status ID" , examples = [ 1 ] )
40
+ name : str = Field (..., description = "Status name" , examples = [ "hired" ] )
41
41
42
42
43
43
class ApplicantPhoto (AccountFile ):
44
44
pass
45
45
46
46
47
47
class Applicant (BaseModel ):
48
- id : int = Field (..., description = "Applicant ID" , example = 1 )
49
- email :
Optional [
str ]
= Field (
None ,
description = "Applicant's email" ,
example = "[email protected] " )
50
- first_name : str = Field (..., description = "Applicant's firstname" , example = "test_name" )
51
- last_name : str = Field (..., description = "Applicant's lastname" , example = "test" )
52
- middle_name : Optional [str ] = Field (None , description = "Applicant's patronymic" , example = "test" )
53
- position : Optional [str ] = Field (None , description = "Applicant's current job" , example = "test" )
48
+ id : int = Field (..., description = "Applicant ID" , examples = [1 ])
49
+ email : Optional [str ] = Field (
50
+ None ,
51
+ description = "Applicant's email" ,
52
+
53
+ )
54
+ first_name : str = Field (..., description = "Applicant's firstname" , examples = ["test_name" ])
55
+ last_name : str = Field (..., description = "Applicant's lastname" , examples = ["test" ])
56
+ middle_name : Optional [str ] = Field (
57
+ None ,
58
+ description = "Applicant's patronymic" ,
59
+ examples = ["test" ],
60
+ )
61
+ position : Optional [str ] = Field (None , description = "Applicant's current job" , examples = ["test" ])
54
62
birthday : Optional [date ] = Field (
55
63
None ,
56
64
description = "Applicant's birthday" ,
57
- example = date (1970 , 1 , 1 ),
65
+ examples = [ date (1970 , 1 , 1 )] ,
58
66
)
59
67
company : Optional [str ] = Field (
60
68
None ,
61
69
description = "Last company the applicant worked for" ,
62
- example = "test" ,
70
+ examples = [ "test" ] ,
63
71
)
64
- money : Optional [str ] = Field (None , description = "Desired salary of the applicant" , example = "10$" )
65
- phone : Optional [str ] = Field (None , description = "Applicant's phone" , example = "+99999999" )
66
- skype : Optional [str ] = Field (None , description = "Applicant's skype" , example = "test_skype" )
72
+ money : Optional [str ] = Field (
73
+ None ,
74
+ description = "Desired salary of the applicant" ,
75
+ examples = ["10$" ],
76
+ )
77
+ phone : Optional [str ] = Field (None , description = "Applicant's phone" , examples = ["+99999999" ])
78
+ skype : Optional [str ] = Field (None , description = "Applicant's skype" , examples = ["test_skype" ])
67
79
photo : Optional [ApplicantPhoto ] = Field (None , description = "Applicant's photo" )
68
80
social : List [ApplicantSocial ] = Field ([], description = "Applicant social media list" )
69
81
questionary : Optional [datetime ] = Field (
70
82
None ,
71
83
description = "Date of filling / changing additional information" ,
72
- example = datetime (1970 , 1 , 1 , 1 , 1 , 1 , 1 ),
84
+ examples = [ datetime (1970 , 1 , 1 , 1 , 1 , 1 , 1 )] ,
73
85
)
74
86
pd_agreement : Optional [ApplicantPDAgreement ] = Field (
75
87
None ,
@@ -78,85 +90,85 @@ class Applicant(BaseModel):
78
90
values : Optional [Dict [str , Any ]] = Field (
79
91
None ,
80
92
description = "Additional applicant fields" ,
81
- example = {"favorite_language" : "python" },
93
+ examples = [ {"favorite_language" : "python" }] ,
82
94
)
83
95
84
96
85
97
class Respondent (BaseModel ):
86
- account_id : int = Field (..., description = "Account ID" , example = 1 )
87
- custom_id : Optional [int ] = Field (None , description = "Custom ID" , example = 1 )
88
- name : Optional [str ] = Field (None , description = "Respondent name" , example = "John" )
89
- email :
str = Field (...,
description = "Respondent email" ,
example = "[email protected] " )
98
+ account_id : int = Field (..., description = "Account ID" , examples = [ 1 ] )
99
+ custom_id : Optional [int ] = Field (None , description = "Custom ID" , examples = [ 1 ] )
100
+ name : Optional [str ] = Field (None , description = "Respondent name" , examples = [ "John" ] )
101
+ email :
str = Field (...,
description = "Respondent email" ,
examples = [ "[email protected] " ] )
90
102
91
103
92
104
class Survey (BaseModel ):
93
- id : int = Field (..., description = "Survey ID" , example = 1 )
94
- name : str = Field (..., description = "Survey name" , example = "test" )
95
- type : SurveyType = Field (..., description = "Survey type" , example = SurveyType .TYPE_A )
105
+ id : int = Field (..., description = "Survey ID" , examples = [ 1 ] )
106
+ name : str = Field (..., description = "Survey name" , examples = [ "test" ] )
107
+ type : SurveyType = Field (..., description = "Survey type" , examples = [ SurveyType .TYPE_A ] )
96
108
created : datetime = Field (
97
109
...,
98
110
description = "Date the survey was created" ,
99
- example = datetime (1970 , 1 , 1 , 1 , 1 , 1 ),
111
+ examples = [ datetime (1970 , 1 , 1 , 1 , 1 , 1 )] ,
100
112
)
101
113
updated : Optional [datetime ] = Field (
102
114
None ,
103
115
description = "Date the survey was changed" ,
104
- example = datetime (1970 , 1 , 1 , 1 , 1 , 1 ),
116
+ examples = [ datetime (1970 , 1 , 1 , 1 , 1 , 1 )] ,
105
117
)
106
- active : bool = Field (..., description = "Active flag" , example = True )
118
+ active : bool = Field (..., description = "Active flag" , examples = [ True ] )
107
119
108
120
109
121
class SurveyAnswerOfTypeA (BaseModel ):
110
- id : int = Field (..., description = "Survey answer ID" , example = 1 )
122
+ id : int = Field (..., description = "Survey answer ID" , examples = [ 1 ] )
111
123
respondent : Respondent
112
124
survey : Survey
113
125
created : datetime = Field (
114
126
...,
115
127
description = "Date of the questionnaire" ,
116
- example = datetime (1970 , 1 , 1 , 1 , 1 , 1 ),
128
+ examples = [ datetime (1970 , 1 , 1 , 1 , 1 , 1 )] ,
117
129
)
118
130
updated : Optional [datetime ] = Field (
119
- ... ,
131
+ None ,
120
132
description = "Date the questionnaire was modified" ,
121
- example = datetime (1970 , 1 , 1 , 1 , 1 , 1 ),
133
+ examples = [ datetime (1970 , 1 , 1 , 1 , 1 , 1 )] ,
122
134
)
123
135
values : Optional [Dict [str , Any ]] = Field (
124
136
None ,
125
137
description = "Survey results" ,
126
- example = {"question" : "answer" },
138
+ examples = [ {"question" : "answer" }] ,
127
139
)
128
140
129
141
130
142
class RejectionReason (BaseModel ):
131
- id : int = Field (..., description = "Rejection reason ID" , example = 1 )
132
- name : str = Field (..., description = "Rejection reason name" , example = "Too far" )
143
+ id : int = Field (..., description = "Rejection reason ID" , examples = [ 1 ] )
144
+ name : str = Field (..., description = "Rejection reason name" , examples = [ "Too far" ] )
133
145
134
146
135
147
class ApplicantLog (BaseModel ):
136
- id : int = Field (..., description = "Applicant log ID" , example = 1 )
148
+ id : int = Field (..., description = "Applicant log ID" , examples = [ 1 ] )
137
149
type : ApplicantLogType = Field (
138
150
...,
139
151
description = "Applicant log type" ,
140
- example = ApplicantLogType .STATUS ,
152
+ examples = [ ApplicantLogType .STATUS ] ,
141
153
)
142
154
status : Optional [VacancyApplicantStatus ] = None
143
155
employment_date : Optional [date ] = Field (
144
156
None ,
145
157
description = "Applicant employment date" ,
146
- example = date (1970 , 1 , 1 ),
158
+ examples = [ date (1970 , 1 , 1 )] ,
147
159
)
148
160
removed : Optional [datetime ] = Field (
149
161
None ,
150
162
description = "Record delete date time" ,
151
- example = datetime (1970 , 1 , 1 , 1 , 1 , 1 ),
163
+ examples = [ datetime (1970 , 1 , 1 , 1 , 1 , 1 )] ,
152
164
)
153
- comment : Optional [str ] = Field (None , description = "Comment" , example = "comment" )
165
+ comment : Optional [str ] = Field (None , description = "Comment" , examples = [ "comment" ] )
154
166
created : datetime = Field (
155
167
...,
156
168
description = "Log creation date time" ,
157
- example = datetime (1970 , 1 , 1 , 1 , 1 , 1 ),
169
+ examples = [ datetime (1970 , 1 , 1 , 1 , 1 , 1 )] ,
158
170
)
159
- source : Optional [str ]
171
+ source : Optional [str ] = None
160
172
files : List [AccountFile ] = Field ([], description = "List of uploaded files" )
161
173
survey_answer_of_type_a : Optional [SurveyAnswerOfTypeA ] = None
162
174
rejection_reason : Optional [RejectionReason ] = None
@@ -166,6 +178,6 @@ class ApplicantLog(BaseModel):
166
178
167
179
168
180
class ApplicantTag (BaseModel ):
169
- id : int = Field (..., description = "Tag ID" , example = 1 )
170
- name : str = Field (..., description = "Tag name" , example = "COOL" )
171
- color : str = Field (..., description = "Tag color" , example = "000000" )
181
+ id : int = Field (..., description = "Tag ID" , examples = [ 1 ] )
182
+ name : str = Field (..., description = "Tag name" , examples = [ "COOL" ] )
183
+ color : str = Field (..., description = "Tag color" , examples = [ "000000" ] )
0 commit comments