init
This commit is contained in:
@@ -127,6 +127,10 @@ class JobApplication(Base):
|
||||
ai_reason = Column(String(255), nullable=True)
|
||||
# 跳过原因
|
||||
skip_reason = Column(String(255), nullable=True)
|
||||
# 职位 JD 全文(投递/跳过时归档,供复盘与面试准备)
|
||||
jd_text = Column(Text, nullable=True)
|
||||
# 实际发送的打招呼语(仅 chat 方式有值)
|
||||
greeting = Column(String(500), nullable=True)
|
||||
applied_at = Column(DateTime, default=utcnow, nullable=False)
|
||||
|
||||
user = relationship("User", back_populates="applications")
|
||||
|
||||
@@ -37,6 +37,10 @@ def report_application(
|
||||
existing.ai_score = req.ai_score
|
||||
existing.ai_reason = req.ai_reason
|
||||
existing.skip_reason = req.skip_reason
|
||||
if req.jd_text:
|
||||
existing.jd_text = req.jd_text
|
||||
if req.greeting:
|
||||
existing.greeting = req.greeting
|
||||
if session_id:
|
||||
existing.session_id = session_id
|
||||
record = existing
|
||||
@@ -53,6 +57,8 @@ def report_application(
|
||||
ai_score=req.ai_score,
|
||||
ai_reason=req.ai_reason,
|
||||
skip_reason=req.skip_reason,
|
||||
jd_text=req.jd_text,
|
||||
greeting=req.greeting,
|
||||
)
|
||||
db.add(record)
|
||||
|
||||
|
||||
@@ -126,6 +126,8 @@ class ApplicationIn(BaseModel):
|
||||
ai_score: int = -1
|
||||
ai_reason: Optional[str] = None
|
||||
skip_reason: Optional[str] = None
|
||||
jd_text: Optional[str] = None # JD 全文归档
|
||||
greeting: Optional[str] = None # 实际发送的打招呼语
|
||||
|
||||
|
||||
class ApplicationOut(BaseModel):
|
||||
@@ -139,6 +141,8 @@ class ApplicationOut(BaseModel):
|
||||
ai_score: int
|
||||
ai_reason: Optional[str]
|
||||
skip_reason: Optional[str]
|
||||
jd_text: Optional[str]
|
||||
greeting: Optional[str]
|
||||
applied_at: datetime
|
||||
|
||||
class Config:
|
||||
|
||||
Reference in New Issue
Block a user