From c42287ba965e4cbd260869fc1520959aa6aa7cf7 Mon Sep 17 00:00:00 2001 From: zk Date: Thu, 23 Apr 2026 21:03:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8A=95=E9=80=92=E5=8A=A9?= =?UTF-8?q?=E6=89=8Bagent=20=E9=85=8D=E7=BD=AE=E5=AE=9E=E4=BD=93=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/job_agent_config.py | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 app/models/job_agent_config.py diff --git a/app/models/job_agent_config.py b/app/models/job_agent_config.py new file mode 100644 index 0000000..5cac735 --- /dev/null +++ b/app/models/job_agent_config.py @@ -0,0 +1,40 @@ +"""求职助手配置表(bg_job_agent_config) +一个用户一条记录,存储Agent设置和网申常见问题的预设答案 +""" + +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 JobAgentConfig(Base): + """求职助手配置表 bg_job_agent_config""" + __tablename__ = "bg_job_agent_config" + + id: Mapped[int] = mapped_column(BigInteger, primary_key=True) + user_id: Mapped[int] = mapped_column(BigInteger, nullable=False, comment="用户ID") + + # Agent设置 + job_type: Mapped[Optional[int]] = mapped_column(Integer, nullable=True, comment="工作类型 1=实习 2=全职") + agent_mode: Mapped[Optional[int]] = mapped_column(Integer, nullable=True, comment="Agent模式 1=协作模式 2=托管模式") + weekly_target: Mapped[Optional[int]] = mapped_column(Integer, nullable=True, comment="每周投递目标数量 1=少于20个 2=20到50个 3=多于50个") + auto_optimize_resume: Mapped[int] = mapped_column(Integer, default=0, comment="投递时自动针对岗位优化简历 0=关闭 1=开启") + + # 网申常见问题 + accept_dept_transfer: Mapped[Optional[str]] = mapped_column(String(4), nullable=True, comment="是否愿意接受部门调剂,可选值:是/否") + accept_location_transfer: Mapped[Optional[str]] = mapped_column(String(4), nullable=True, comment="是否接受地点调剂,可选值:是/否") + interview_type: Mapped[Optional[list]] = mapped_column(JSON, nullable=True, comment="可参加的面试方式,JSON字符串数组,可选值:线下面试/线上远程") + languages: Mapped[Optional[list]] = mapped_column(JSON, nullable=True, comment="语言能力,JSON对象数组,每项含language(语种)和proficiency(掌握程度)") + available_date: Mapped[Optional[str]] = mapped_column(String(16), nullable=True, comment="预计到岗时间,可选值:一周以内/两周以内/一个月以内/一个月以上") + + # 实习相关(仅job_type=1时填写) + intern_days_per_week: Mapped[Optional[str]] = mapped_column(String(16), nullable=True, comment="每周可实习天数,可选值:3天及以上/4天及以上/5天及以上") + intern_duration: Mapped[Optional[str]] = mapped_column(String(16), nullable=True, comment="预计实习时长,可选值:3个月/4个月/5个月/6个月及以上") + + status: Mapped[int] = mapped_column(Integer, default=0, comment="状态 0=未启用 1=已启用") + 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="更新时间")