Files
StuManagerSys/model/sc_model.py
T

41 lines
1.1 KiB
Python

from sqlalchemy import *
from datetime import datetime
from database import *
class Scores(Base):
__tablename__ = 's_scores'
id=Column( Integer
, primary_key=True
,autoincrement=True
,comment='成绩编号'
)
stu_id=Column(String(50)
, ForeignKey('s_student.stu_id')
,comment='学生编号'
, nullable=False
)
exam_seq=Column(Integer
, nullable=True
,comment='考试序次'
)
score=Column(Float
,comment='分数'
)
create_date=Column(DATETIME
, default=datetime.now
,comment='创建时间'
)
update_date=Column(DATETIME
, default=datetime.now
,onupdate=datetime.now
,comment='更新时间'
)
deleted=Column(Integer
,default=1
, comment='软删除'
)