成绩建表

This commit is contained in:
2026-09-21 21:56:16 +08:00
parent e88306a555
commit 7cdad9a9fe
5 changed files with 47 additions and 35 deletions
+6 -6
View File
@@ -2,23 +2,23 @@ from scores.database import Base
from datetime import datetime
from sqlalchemy import DateTime,Column,Integer,String,Float
class Score(Base):
__tablename__='score'
score_id = Column(Integer
__tablename__='scores'
id = Column(Integer
,primary_key = True
,autoincrement = True
,comment ='编号'
)
student_id = Column(Integer
sid = Column(Integer
,comment ='学生ID'
)
class_id = Column(Integer
cid = Column(Integer
,comment ='班级ID'
)
score_num = Column(Integer
num = Column(Integer
,comment ='考试序次'
)
score = Column(Integer,nullable = False)
subject = Column(String(100)
tsub = Column(String(100)
,nullable = False
)
create_date = Column(DateTime