Files
offerpai_python_ai/app/models/job_agent_config.py
T
2026-04-23 21:03:37 +08:00

41 lines
2.7 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""求职助手配置表(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="更新时间")