16 lines
478 B
Python
16 lines
478 B
Python
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, 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")
|
|
|
|
|