合并统计,学生,老师,成绩,班级模块,还差顾问,就业
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
from sqlalchemy import Column, Integer, Float
|
||||
from sqlalchemy import Column, Integer, Float, ForeignKey
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
from database import Base
|
||||
|
||||
class Score(Base):
|
||||
__tablename__ = "wl_score"
|
||||
|
||||
stu_id = Column(Integer, primary_key=True, comment="学生编号")
|
||||
stu_id = Column(Integer, ForeignKey('wl_student.stu_id'),primary_key=True, comment="学生编号")
|
||||
exam_order = Column(Integer, primary_key=True, comment="考核序次")
|
||||
score = Column(Float, nullable=False, comment="成绩")
|
||||
|
||||
student=relationship("Student",back_populates="scores")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user