添加Ai 简历解析
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
"""用户简历表(bg_user_resume)
|
||||
简历维度信息 + 个人基本信息合并存储
|
||||
"""
|
||||
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
from sqlalchemy import BigInteger, Integer, String, DateTime, JSON
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from app.core.database import Base
|
||||
|
||||
|
||||
class UserResume(Base):
|
||||
"""用户简历表 bg_user_resume"""
|
||||
__tablename__ = "bg_user_resume"
|
||||
|
||||
id: Mapped[int] = mapped_column(BigInteger, primary_key=True)
|
||||
user_id: Mapped[int] = mapped_column(BigInteger, nullable=False, comment="用户ID")
|
||||
|
||||
# 简历维度信息
|
||||
resume_name: Mapped[Optional[str]] = mapped_column(String(128), nullable=True, comment="简历名称")
|
||||
target_position: Mapped[Optional[str]] = mapped_column(String(128), nullable=True, comment="目标岗位")
|
||||
is_default: Mapped[int] = mapped_column(Integer, default=0, comment="是否默认简历 0=否 1=是")
|
||||
sort_order: Mapped[Optional[int]] = mapped_column(Integer, nullable=True, comment="排序序号")
|
||||
|
||||
# 个人信息
|
||||
avatar_url: Mapped[Optional[str]] = mapped_column(String(512), nullable=True, comment="头像URL")
|
||||
name: Mapped[Optional[str]] = mapped_column(String(64), nullable=True, comment="真实姓名")
|
||||
email: Mapped[Optional[str]] = mapped_column(String(128), nullable=True, comment="邮箱")
|
||||
mobile_number: Mapped[Optional[str]] = mapped_column(String(20), nullable=True, comment="手机号码")
|
||||
city: Mapped[Optional[str]] = mapped_column(String(64), nullable=True, comment="所在城市")
|
||||
wechat_number: Mapped[Optional[str]] = mapped_column(String(64), nullable=True, comment="微信号")
|
||||
portfolio_url: Mapped[Optional[str]] = mapped_column(String(512), nullable=True, comment="作品集链接")
|
||||
skills: Mapped[Optional[list]] = mapped_column(JSON, nullable=True, comment="技能标签列表")
|
||||
certificates: Mapped[Optional[list]] = mapped_column(JSON, nullable=True, comment="证书标签列表")
|
||||
summary: Mapped[Optional[str]] = mapped_column(String(2000), nullable=True, comment="个人概述")
|
||||
|
||||
create_time: Mapped[datetime] = mapped_column(DateTime, default=datetime.now, comment="创建时间")
|
||||
update_time: Mapped[datetime] = mapped_column(DateTime, default=datetime.now, onupdate=datetime.now, comment="更新时间")
|
||||
@@ -0,0 +1,25 @@
|
||||
"""简历-竞赛经历表(bg_user_resume_competition)"""
|
||||
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
from sqlalchemy import BigInteger, Integer, String, DateTime, JSON
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from app.core.database import Base
|
||||
|
||||
|
||||
class UserResumeCompetition(Base):
|
||||
"""简历-竞赛经历表 bg_user_resume_competition"""
|
||||
__tablename__ = "bg_user_resume_competition"
|
||||
|
||||
id: Mapped[int] = mapped_column(BigInteger, primary_key=True)
|
||||
resume_id: Mapped[int] = mapped_column(BigInteger, nullable=False, comment="关联bg_user_resume.id")
|
||||
user_id: Mapped[int] = mapped_column(BigInteger, nullable=False, comment="用户ID")
|
||||
competition_name: Mapped[Optional[str]] = mapped_column(String(128), nullable=True, comment="竞赛名称")
|
||||
award: Mapped[Optional[str]] = mapped_column(String(128), nullable=True, comment="获奖情况")
|
||||
award_date: Mapped[Optional[str]] = mapped_column(String(16), nullable=True, comment="获奖时间,格式:2023.07")
|
||||
description: Mapped[Optional[list]] = mapped_column(JSON, nullable=True, comment="描述段落 [{id, text}]")
|
||||
sort_order: Mapped[Optional[int]] = mapped_column(Integer, nullable=True, comment="排序序号")
|
||||
create_time: Mapped[datetime] = mapped_column(DateTime, default=datetime.now, comment="创建时间")
|
||||
update_time: Mapped[datetime] = mapped_column(DateTime, default=datetime.now, onupdate=datetime.now, comment="更新时间")
|
||||
@@ -0,0 +1,28 @@
|
||||
"""简历-教育经历表(bg_user_resume_education)"""
|
||||
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
from sqlalchemy import BigInteger, Integer, String, DateTime, JSON
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from app.core.database import Base
|
||||
|
||||
|
||||
class UserResumeEducation(Base):
|
||||
"""简历-教育经历表 bg_user_resume_education"""
|
||||
__tablename__ = "bg_user_resume_education"
|
||||
|
||||
id: Mapped[int] = mapped_column(BigInteger, primary_key=True)
|
||||
resume_id: Mapped[int] = mapped_column(BigInteger, nullable=False, comment="关联bg_user_resume.id")
|
||||
user_id: Mapped[int] = mapped_column(BigInteger, nullable=False, comment="用户ID")
|
||||
school: Mapped[Optional[str]] = mapped_column(String(128), nullable=True, comment="学校名称")
|
||||
major: Mapped[Optional[str]] = mapped_column(String(128), nullable=True, comment="专业")
|
||||
degree: Mapped[Optional[str]] = mapped_column(String(32), nullable=True, comment="学历:大专/本科/硕士/博士")
|
||||
study_type: Mapped[Optional[str]] = mapped_column(String(32), nullable=True, comment="学习形式:全日制/非全日制")
|
||||
start_date: Mapped[Optional[str]] = mapped_column(String(16), nullable=True, comment="开始时间,格式:2023.09")
|
||||
end_date: Mapped[Optional[str]] = mapped_column(String(16), nullable=True, comment="结束时间,格式:2024.06")
|
||||
description: Mapped[Optional[list]] = mapped_column(JSON, nullable=True, comment="描述段落 [{id, text}]")
|
||||
sort_order: Mapped[Optional[int]] = mapped_column(Integer, nullable=True, comment="排序序号")
|
||||
create_time: Mapped[datetime] = mapped_column(DateTime, default=datetime.now, comment="创建时间")
|
||||
update_time: Mapped[datetime] = mapped_column(DateTime, default=datetime.now, onupdate=datetime.now, comment="更新时间")
|
||||
@@ -0,0 +1,26 @@
|
||||
"""简历-实习经历表(bg_user_resume_internship)"""
|
||||
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
from sqlalchemy import BigInteger, Integer, String, DateTime, JSON
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from app.core.database import Base
|
||||
|
||||
|
||||
class UserResumeInternship(Base):
|
||||
"""简历-实习经历表 bg_user_resume_internship"""
|
||||
__tablename__ = "bg_user_resume_internship"
|
||||
|
||||
id: Mapped[int] = mapped_column(BigInteger, primary_key=True)
|
||||
resume_id: Mapped[int] = mapped_column(BigInteger, nullable=False, comment="关联bg_user_resume.id")
|
||||
user_id: Mapped[int] = mapped_column(BigInteger, nullable=False, comment="用户ID")
|
||||
company_name: Mapped[Optional[str]] = mapped_column(String(128), nullable=True, comment="公司名称")
|
||||
position: Mapped[Optional[str]] = mapped_column(String(128), nullable=True, comment="职位")
|
||||
start_date: Mapped[Optional[str]] = mapped_column(String(16), nullable=True, comment="开始时间,格式:2023.06")
|
||||
end_date: Mapped[Optional[str]] = mapped_column(String(16), nullable=True, comment="结束时间,格式:2023.09")
|
||||
description: Mapped[Optional[list]] = mapped_column(JSON, nullable=True, comment="描述段落 [{id, text}]")
|
||||
sort_order: Mapped[Optional[int]] = mapped_column(Integer, nullable=True, comment="排序序号")
|
||||
create_time: Mapped[datetime] = mapped_column(DateTime, default=datetime.now, comment="创建时间")
|
||||
update_time: Mapped[datetime] = mapped_column(DateTime, default=datetime.now, onupdate=datetime.now, comment="更新时间")
|
||||
@@ -0,0 +1,27 @@
|
||||
"""简历-项目经历表(bg_user_resume_project)"""
|
||||
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
from sqlalchemy import BigInteger, Integer, String, DateTime, JSON
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from app.core.database import Base
|
||||
|
||||
|
||||
class UserResumeProject(Base):
|
||||
"""简历-项目经历表 bg_user_resume_project"""
|
||||
__tablename__ = "bg_user_resume_project"
|
||||
|
||||
id: Mapped[int] = mapped_column(BigInteger, primary_key=True)
|
||||
resume_id: Mapped[int] = mapped_column(BigInteger, nullable=False, comment="关联bg_user_resume.id")
|
||||
user_id: Mapped[int] = mapped_column(BigInteger, nullable=False, comment="用户ID")
|
||||
company_name: Mapped[Optional[str]] = mapped_column(String(128), nullable=True, comment="所属公司")
|
||||
project_name: Mapped[Optional[str]] = mapped_column(String(128), nullable=True, comment="项目名称")
|
||||
role: Mapped[Optional[str]] = mapped_column(String(64), nullable=True, comment="担任角色")
|
||||
start_date: Mapped[Optional[str]] = mapped_column(String(16), nullable=True, comment="开始时间,格式:2023.06")
|
||||
end_date: Mapped[Optional[str]] = mapped_column(String(16), nullable=True, comment="结束时间,格式:2023.09")
|
||||
description: Mapped[Optional[list]] = mapped_column(JSON, nullable=True, comment="描述段落 [{id, text}]")
|
||||
sort_order: Mapped[Optional[int]] = mapped_column(Integer, nullable=True, comment="排序序号")
|
||||
create_time: Mapped[datetime] = mapped_column(DateTime, default=datetime.now, comment="创建时间")
|
||||
update_time: Mapped[datetime] = mapped_column(DateTime, default=datetime.now, onupdate=datetime.now, comment="更新时间")
|
||||
@@ -0,0 +1,26 @@
|
||||
"""简历-工作经历表(bg_user_resume_work)"""
|
||||
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
from sqlalchemy import BigInteger, Integer, String, DateTime, JSON
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from app.core.database import Base
|
||||
|
||||
|
||||
class UserResumeWork(Base):
|
||||
"""简历-工作经历表 bg_user_resume_work"""
|
||||
__tablename__ = "bg_user_resume_work"
|
||||
|
||||
id: Mapped[int] = mapped_column(BigInteger, primary_key=True)
|
||||
resume_id: Mapped[int] = mapped_column(BigInteger, nullable=False, comment="关联bg_user_resume.id")
|
||||
user_id: Mapped[int] = mapped_column(BigInteger, nullable=False, comment="用户ID")
|
||||
company_name: Mapped[Optional[str]] = mapped_column(String(128), nullable=True, comment="公司名称")
|
||||
position: Mapped[Optional[str]] = mapped_column(String(128), nullable=True, comment="职位")
|
||||
start_date: Mapped[Optional[str]] = mapped_column(String(16), nullable=True, comment="开始时间,格式:2023.06")
|
||||
end_date: Mapped[Optional[str]] = mapped_column(String(16), nullable=True, comment="结束时间,格式:2023.09")
|
||||
description: Mapped[Optional[list]] = mapped_column(JSON, nullable=True, comment="描述段落 [{id, text}]")
|
||||
sort_order: Mapped[Optional[int]] = mapped_column(Integer, nullable=True, comment="排序序号")
|
||||
create_time: Mapped[datetime] = mapped_column(DateTime, default=datetime.now, comment="创建时间")
|
||||
update_time: Mapped[datetime] = mapped_column(DateTime, default=datetime.now, onupdate=datetime.now, comment="更新时间")
|
||||
Reference in New Issue
Block a user