62 lines
1.9 KiB
Python
62 lines
1.9 KiB
Python
from util.database import Base,engine
|
|
from sqlalchemy import Column,Integer,String,DATE,DATETIME,ForeignKey,Numeric
|
|
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(Numeric(10,2)
|
|
,nullable=False
|
|
,comment='薪资'
|
|
)
|
|
|
|
create_time = Column(DATETIME
|
|
,default=datetime.now
|
|
,comment='创建时间'
|
|
)
|
|
|
|
update_time = Column(DATETIME
|
|
,default=datetime.now
|
|
,onupdate=datetime.now
|
|
,comment='更新时间'
|
|
)
|
|
|
|
delete_status = Column(
|
|
Integer,default=0,comment='删除状态:0未删除,1已删除')
|
|
|
|
delete_time = Column(DATETIME,default=datetime.now,onupdate=datetime.now,comment='删除时间')
|
|
|
|
Base.metadata.create_all(engine) |