数据库模型类名修改以及文件名修改

This commit is contained in:
maruizhi
2026-09-20 15:32:28 +08:00
parent 7f419fb8ad
commit 67e8f49c80
6 changed files with 60 additions and 11 deletions
+20
View File
@@ -0,0 +1,20 @@
from pydantic import BaseModel,field_serializer
class StudentResponse(BaseModel):
code:int = 200
detail:str = 'ok'
stu_name:str
age:int
gender:str
progress:int
@field_serializer('progress')
def int_to_string(cls,progress:int):
d1 ={
0:'学习中',
1:'求职中',
2:'已就业'
}
return d1.get(progress,'暂不明确')