feat: 初始化学生管理系统代码

This commit is contained in:
mister-ye
2026-09-21 18:03:04 +08:00
commit 70783dd350
42 changed files with 1547 additions and 0 deletions
+62
View File
@@ -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