更新所有模块框架,建表已写好,学生查询模块已经写好,正在写新增模块。
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
# students_model处理数据库模型
|
||||
import datetime
|
||||
|
||||
from students.databases import *
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
class Students(Base):
|
||||
__tablename__ = 'students'
|
||||
sid = Column(Integer
|
||||
, primary_key=True
|
||||
, autoincrement=True
|
||||
, comment='学生编号,自增主键'
|
||||
)
|
||||
|
||||
student_name = Column(String(20) , comment='学生姓名' , nullable=False )
|
||||
|
||||
student_phone = Column(String(11) , comment='学生手机号' , nullable=False , unique=True )
|
||||
|
||||
class_name = Column(String(20) , comment='学生班级' , nullable=False )
|
||||
|
||||
job_open_time = Column(DATETIME , comment='就业开放时间')
|
||||
|
||||
offer_issue_time = Column(DATETIME , comment='offer下发时间')
|
||||
|
||||
company_name = Column(String(100) , comment='就业公司名称')
|
||||
|
||||
salary = Column(Integer , comment='就业薪资')
|
||||
|
||||
create_date = Column(DATETIME , default=datetime.now , comment='创建时间' )
|
||||
|
||||
update_date = Column(DATETIME , default=datetime.now , comment='更新时间' )
|
||||
|
||||
is_deleted = Column(INTEGER , default=False , comment='是否删除:0-正常,1-已删除' )
|
||||
|
||||
deleted_date = Column(DATETIME , default=datetime.now , comment='删除时间' )
|
||||
|
||||
Reference in New Issue
Block a user