From 8b808a368178d8e6a0a42a9a704ac0c26cb48219 Mon Sep 17 00:00:00 2001 From: maruizhi <3088243241@qq.com> Date: Mon, 21 Sep 2026 16:45:33 +0800 Subject: [PATCH] mrz --- PythonProject/model/all_model.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/PythonProject/model/all_model.py b/PythonProject/model/all_model.py index a2be52c..c8904a8 100644 --- a/PythonProject/model/all_model.py +++ b/PythonProject/model/all_model.py @@ -10,6 +10,11 @@ class Student_Model(Base): , autoincrement=True ,comment='学生编号') + class_id = Column(Integer + ,ForeignKey('wl_class.class_id') + ,comment='班级编号' + ) + stu_name=Column(String(100),comment='学生姓名') age=Column(Integer,comment='年龄') @@ -49,12 +54,6 @@ class ClassManagement(Base): class_id= Column(Integer, primary_key=True, autoincrement=True,comment='班级编号') - stu_id = Column(Integer - ,ForeignKey('wl_student.stu_id') - ,nullable=False - ,comment='学生编号' - ) - class_name = Column(String(100), comment='班级姓名') start_class_date = Column(DATE,comment='开课时间')