学生管理系统代码
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
|
||||
from sqlalchemy import Column, Integer, ForeignKey
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
from database import Base
|
||||
|
||||
class Score(Base):
|
||||
__tablename__ = "score"
|
||||
id = Column(Integer, primary_key=True,autoincrement=True)
|
||||
student_id = Column(Integer, ForeignKey("student.sid"),nullable=False)
|
||||
exam_id = Column(Integer, nullable=False)
|
||||
score = Column(Integer, nullable=False)
|
||||
flag = Column(Integer,default=1,nullable=False)
|
||||
student=relationship("Student",back_populates="scores")
|
||||
|
||||
Reference in New Issue
Block a user