feat: 初始化学生管理系统代码
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
from datetime import datetime
|
||||
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
|
||||
class StudentOut(BaseModel):
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
id: int
|
||||
name: str
|
||||
age: int | None = None
|
||||
class_id: int | None = None
|
||||
|
||||
|
||||
class StudentGenderOut(BaseModel):
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
class_id: int | None = None
|
||||
total: int
|
||||
gender_male: int
|
||||
gender_female: int
|
||||
|
||||
|
||||
class StudentRecordOut1(BaseModel):
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
id: int
|
||||
name: str
|
||||
score: float
|
||||
|
||||
|
||||
class StudentRecordOut2(BaseModel):
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
id: int
|
||||
name: str
|
||||
class_id: int | None = None
|
||||
score: float
|
||||
|
||||
|
||||
class StudentRecordOut3(BaseModel):
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
exam_seq: int
|
||||
class_name: str
|
||||
avg_score: float
|
||||
|
||||
|
||||
class StudentRecordOut4(BaseModel):
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
name: str
|
||||
class_id: int | None = None
|
||||
employment_open_time: datetime | None = None
|
||||
company_name: str | None = None
|
||||
salary: float | None = None
|
||||
|
||||
|
||||
class StudentRecordOut5(BaseModel):
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
stu_id: int
|
||||
time_diff: float
|
||||
|
||||
|
||||
class StudentRecordOut6(BaseModel):
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
class_id: int | None = None
|
||||
time_diff: float
|
||||
Reference in New Issue
Block a user