Files
offerpai_python_ai/app/models/resume_diagnosis_issue.py
2026-04-07 20:15:43 +08:00

33 lines
2.5 KiB
Python
Raw Permalink 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_resume_diagnosis_issue"""
from datetime import datetime
from typing import Optional
from sqlalchemy import BigInteger, Integer, String, Text, DateTime, JSON
from sqlalchemy.orm import Mapped, mapped_column
from app.core.database import Base
class ResumeDiagnosisIssue(Base):
"""简历诊断问题表 bg_resume_diagnosis_issue"""
__tablename__ = "bg_resume_diagnosis_issue"
id: Mapped[int] = mapped_column(BigInteger, primary_key=True)
report_id: Mapped[int] = mapped_column(BigInteger, nullable=False, comment="关联report.id")
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")
module_type: Mapped[str] = mapped_column(String(32), nullable=False, comment="模块类型: summary/education/work/internship/project/competition")
module_record_id: Mapped[int] = mapped_column(BigInteger, nullable=False, comment="模块记录IDsummary时为resume_id")
finding: Mapped[Optional[str]] = mapped_column(Text, nullable=True, comment="诊断发现")
importance: Mapped[Optional[str]] = mapped_column(Text, nullable=True, comment="为什么重要")
suggestion: Mapped[Optional[str]] = mapped_column(Text, nullable=True, comment="改进建议")
urgent_issues: Mapped[Optional[dict]] = mapped_column(JSON, nullable=True, comment='紧急修复子类型计数 {"typo": 0}')
important_issues: Mapped[Optional[dict]] = mapped_column(JSON, nullable=True, comment='重点优化子类型计数 {"no_result": 0, "no_quantify": 0, "weak_relevance": 0}')
expression_issues: Mapped[Optional[dict]] = mapped_column(JSON, nullable=True, comment='表达提升子类型计数 {"not_concise": 0, "format_inconsistent": 0}')
optimized_content: Mapped[Optional[list | str]] = mapped_column(JSON, nullable=True, comment="AI改写后的内容,子表模块与原description格式一致[{id,text}]保持原id只改写textsummary模块为纯文本字符串")
status: Mapped[int] = mapped_column(Integer, default=0, comment="0=待处理 1=已处理")
user_feedback: Mapped[int] = mapped_column(Integer, default=0, comment="0=未评价 1=符合 2=不符合")
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="更新时间")