增加了num的唯一键,修改了dao和api

This commit is contained in:
2026-09-22 23:01:18 +08:00
committed by geyuan
parent c0880f9a44
commit 65d67e7cf6
6 changed files with 88 additions and 109 deletions
@@ -14,6 +14,7 @@ class ClassInfo(Base_all):
)
num = Column(String(50)
,nullable=False
,unique=True
,comment='班级编号'
)
name = Column(String(50)
@@ -21,26 +22,18 @@ class ClassInfo(Base_all):
,comment='班级名称'
)
head_teacher_id = Column(Integer
# ,ForeignKey('teacher.id')
,ForeignKey('teacher.id')
,comment='班主任编号'
)
coach_teacher_id = Column(Integer
# ,ForeignKey('teacher.id')
,ForeignKey('teacher.id')
,comment='授课老师编号'
)
tutor_teacher_id = Column(Integer
# ,ForeignKey('teacher.id')
,ForeignKey('teacher.id')
,comment='助教老师编号'
)
# class_teacher = Column(String(50)
# ,nullable=False
# ,comment='班主任'
# )
# class_lecturer = Column(String(50)
# ,nullable=False
# ,comment='授课老师'
# )
class_start_time = Column(Date
,comment='开班日期'
)