48 lines
1.8 KiB
Python
48 lines
1.8 KiB
Python
from util.database import Base,engine
|
|||
|
|
from sqlalchemy import Column,Integer,String,DATE,DATETIME,ForeignKey
|
||
|
|
from datetime import datetime
|
||
|
|
|
||
|
|
class Employment_info(Base):
|
||
|
|
__tablename__ = 'wl_employment'
|
||
|
|
emp_id = Column(Integer
|
||
|
|
,primary_key=True
|
||
|
|
,autoincrement=True
|
||
|
|
,comment='序号'
|
||
|
|
)
|
||
|
|
stu_id = Column(Integer
|
||
|
|
,ForeignKey('wl_student.stu_id')
|
||
|
|
,nullable=False
|
||
|
|
,comment='学生编号'
|
||
|
|
)
|
||
|
|
email = Column(String(50)
|
||
|
|
,unique=True
|
||
|
|
,comment='邮箱'
|
||
|
|
)
|
||
|
|
employment_opening_date = Column(DATE
|
||
|
|
,comment='就业开放日期'
|
||
|
|
)
|
||
|
|
offer_issuance_date = Column(DATE
|
||
|
|
,comment='offer下发日期'
|
||
|
|
)
|
||
|
|
company_name = Column(String(50)
|
||
|
|
,comment='就业公司名称'
|
||
|
|
)
|
||
|
|
company_address = Column(String(100)
|
||
|
|
,comment='就业公司地址')
|
||
|
|
salary = Column(Integer
|
||
|
|
,comment='薪资')
|
||
|
|
deletion_status = Column(Integer
|
||
|
|
,default=0
|
||
|
|
,comment='信息留存状态【0:初始值;1:已删除】'
|
||
|
|
)
|
||
|
|
create_time = Column(DATETIME
|
||
|
|
,default=datetime.now
|
||
|
|
,comment='创建时间'
|
||
|
|
)
|
||
|
|
update_time = Column(DATETIME
|
||
|
|
,default=datetime.now
|
||
|
|
,onupdate=datetime.now
|
||
|
|
,comment='更新时间'
|
||
|
|
)
|
||
|
|
|
||
|
|
Base.metadata.create_all(engine)
|