Files
1/model/wl_score_model.py
T

16 lines
478 B
Python
Raw Normal View History

from sqlalchemy import Column, Integer, Float, ForeignKey
from sqlalchemy.orm import relationship
2026-09-12 16:30:43 +08:00
from database import Base
2026-09-12 20:55:36 +08:00
class Score(Base):
__tablename__ = "wl_score"
2026-09-12 16:30:43 +08:00
stu_id = Column(Integer, ForeignKey('wl_student.stu_id'),primary_key=True, comment="学生编号")
2026-09-12 16:30:43 +08:00
exam_order = Column(Integer, primary_key=True, comment="考核序次")
score = Column(Float, nullable=False, comment="成绩")
student=relationship("Student",back_populates="scores")
2026-09-12 16:30:43 +08:00