This commit is contained in:
z_xl
2026-09-21 20:16:09 +08:00
commit fe44708fa6
91 changed files with 4530 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
from sqlalchemy import Column, Integer, Float, ForeignKey, String
from sqlalchemy.orm import relationship
from database import Base
class Score(Base):
__tablename__ = "wl_score"
# 和 wl_emp 一样:学号直接做主键,同时做外键指向学生表的业务学号,
# 不再用内部主键 stu_id。长度跟 Student.stu_no 保持一致。
stu_no = Column(String(20), ForeignKey('wl_student.stu_no'), primary_key=True, comment="学号")
exam_order = Column(Integer, primary_key=True, comment="考核序次")
score = Column(Float, nullable=False, comment="成绩")
student=relationship("Student",back_populates="scores")