Merge remote-tracking branch 'origin/xiaoyang_score' into lon_students_merge_code_test
# Conflicts: # scores/main.py # scores/model/score_model.py
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
from databases import engine_all,Base_all,Session
|
||||
from scores.database import Base
|
||||
from datetime import datetime
|
||||
from sqlalchemy import DateTime,Column,Integer,String,Float,ForeignKey
|
||||
class Score(Base):
|
||||
from sqlalchemy import DateTime,Column,Integer,String,Float
|
||||
class Score(Base_all):
|
||||
__tablename__='scores'
|
||||
@@ -10,9 +12,11 @@ class Score(Base_all):
|
||||
,comment ='编号'
|
||||
)
|
||||
sid = Column(Integer
|
||||
,ForeignKey('students.id')
|
||||
,comment ='学生ID'
|
||||
)
|
||||
cid = Column(Integer
|
||||
,ForeignKey('classes.id')
|
||||
,comment ='班级ID'
|
||||
)
|
||||
num = Column(Integer
|
||||
@@ -20,6 +24,7 @@ class Score(Base_all):
|
||||
)
|
||||
score = Column(Integer,nullable = False)
|
||||
tsub = Column(String(100)
|
||||
, ForeignKey('subject.id')
|
||||
,nullable = False
|
||||
)
|
||||
create_date = Column(DateTime
|
||||
|
||||
Reference in New Issue
Block a user