38 lines
1.2 KiB
Python
38 lines
1.2 KiB
Python
# 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='删除时间' )
|
||
|
|
|