This commit is contained in:
maruizhi
2026-09-22 14:36:43 +08:00
parent 14e792885a
commit bf44ac9450
4 changed files with 34 additions and 33 deletions
+15
View File
@@ -18,6 +18,21 @@ class EmploymentRequest(BaseModel):
raise ValueError('offer下发日期不能早于就业开放日期')
return self
class UpdateEmpRequest(BaseModel):
email: Optional[str] = Field(None, description='邮箱')
employment_opening_date:Optional[date] = Field(None, description='就业开放日期')
offer_issuance_date:Optional[date] = Field(None, description='offer下发日期')
company_name:Optional[str] = Field(None, description='公司名称')
company_address:Optional[str] = Field(None, description='公司地址')
salary:Optional[float] = Field(None, description='薪资')
@model_validator(mode='after')
def check_date(self):
if self.employment_opening_date and self.offer_issuance_date:
if self.employment_opening_date > self.offer_issuance_date:
raise ValueError('offer下发日期不能早于就业开放日期')
return self
class EmploymentResponse(BaseModel):
code:int = 200
detail:str = 'OK'