成绩模块+课程模块

This commit is contained in:
2026-09-22 17:36:49 +08:00
parent 0cb1d8e196
commit ca3cc80a0d
9 changed files with 361 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
from database import DATETIME, Base, Column, Integer, String
from datetime import datetime
class Course(Base):
__tablename__ = 'student_course'
course_id = Column(String(20), primary_key=True, comment='课程编号')
course_name = Column(String(50), nullable=False, comment='课程名称')
teacher_id = Column(String(20), nullable=True, comment='授课教师编号')
is_deleted = Column(Integer, nullable=False, default=0, comment='0未删1已删')
create_time = Column(DATETIME, default=datetime.now, nullable=False)
update_time = Column(DATETIME, default=datetime.now, onupdate=datetime.now, nullable=False)