上传文件至「/」
This commit is contained in:
+29
@@ -0,0 +1,29 @@
|
|||||||
|
from sqlalchemy import create_engine, Column, Integer, String, Float, ForeignKey, Table, Date
|
||||||
|
from sqlalchemy.orm import relationship
|
||||||
|
from model import Base
|
||||||
|
|
||||||
|
class Student(Base):
|
||||||
|
__tablename__="student"
|
||||||
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
||||||
|
stu_id=Column(String(50),unique=True)
|
||||||
|
name = Column(String(50), nullable=False)
|
||||||
|
hometown=Column(String(100))
|
||||||
|
school = Column(String(100))
|
||||||
|
major= Column(String(100))
|
||||||
|
enroll_time=Column(String(100))
|
||||||
|
graduate_time=Column(String(100))
|
||||||
|
education=Column(String(100))
|
||||||
|
age=Column(Integer)
|
||||||
|
gender=Column(String(10))
|
||||||
|
statu=Column(Integer,nullable=False)
|
||||||
|
advisor_id = Column(Integer, ForeignKey("advisor.id"), nullable=True)
|
||||||
|
class_id = Column(Integer, ForeignKey("classinfo.id"))
|
||||||
|
advisor = relationship("Advisor", back_populates="students")#关联顾问
|
||||||
|
scores = relationship("Score", back_populates="student")#关联成绩
|
||||||
|
employment=relationship("Employment", back_populates="student")#关联就业
|
||||||
|
classinfo = relationship("ClassInfo", back_populates="students")#关联班级
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user