上传文件至「model」
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
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='软删除'
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user