Files
SST/PythonProject/model/employment_model.py
T

62 lines
1.9 KiB
Python
Raw Normal View History

2026-09-21 11:11:05 +08:00
from util.database import Base,engine
2026-09-21 14:13:58 +08:00
from sqlalchemy import Column,Integer,String,DATE,DATETIME,ForeignKey,Numeric
2026-09-21 11:11:05 +08:00
from datetime import datetime
class Employment_info(Base):
__tablename__ = 'wl_employment'
2026-09-21 11:20:34 +08:00
2026-09-21 11:11:05 +08:00
emp_id = Column(Integer
,primary_key=True
,autoincrement=True
,comment='序号'
)
2026-09-21 11:20:34 +08:00
2026-09-21 11:11:05 +08:00
stu_id = Column(Integer
,ForeignKey('wl_student.stu_id')
,nullable=False
,comment='学生编号'
)
2026-09-21 11:20:34 +08:00
2026-09-21 11:11:05 +08:00
email = Column(String(50)
,unique=True
,comment='邮箱'
)
2026-09-21 11:20:34 +08:00
2026-09-21 11:11:05 +08:00
employment_opening_date = Column(DATE
,comment='就业开放日期'
)
2026-09-21 11:20:34 +08:00
2026-09-21 11:11:05 +08:00
offer_issuance_date = Column(DATE
,comment='offer下发日期'
)
2026-09-21 11:20:34 +08:00
2026-09-21 11:11:05 +08:00
company_name = Column(String(50)
,comment='就业公司名称'
)
2026-09-21 11:20:34 +08:00
2026-09-21 11:11:05 +08:00
company_address = Column(String(100)
2026-09-21 11:20:34 +08:00
,comment='就业公司地址'
2026-09-21 11:11:05 +08:00
)
2026-09-21 11:20:34 +08:00
2026-09-21 14:13:58 +08:00
salary = Column(Numeric(10,2)
,nullable=False
2026-09-21 11:20:34 +08:00
,comment='薪资'
)
2026-09-21 11:11:05 +08:00
create_time = Column(DATETIME
,default=datetime.now
,comment='创建时间'
)
2026-09-21 11:20:34 +08:00
2026-09-21 11:11:05 +08:00
update_time = Column(DATETIME
,default=datetime.now
,onupdate=datetime.now
,comment='更新时间'
)
2026-09-21 11:20:34 +08:00
delete_status = Column(
Integer,default=0,comment='删除状态:0未删除,1已删除')
2026-09-21 11:51:37 +08:00
delete_time = Column(DATETIME,default=datetime.now,onupdate=datetime.now,comment='删除时间')
2026-09-21 11:11:05 +08:00
Base.metadata.create_all(engine)