Coverage for backend / app / job_rating / schemas.py: 100%
35 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-03-17 21:34 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-03-17 21:34 +0000
1"""Job Rating schemas"""
3import datetime as dt
5from pydantic import BaseModel
7from app.base_schemas import Out
10# --------------------------------------------------- AI SYSTEM PROMPT ---------------------------------------------------
13class AiSystemPromptOut(Out):
14 """AI System Prompt output schema"""
16 prompt: str
19# ----------------------------------------------------- JOB RATING -----------------------------------------------------
22class JobRatingOut(BaseModel):
23 """Job Rating output schema"""
25 overall_score: int | None
26 technical_score: int | None
27 experience_score: int | None
28 educational_score: int | None
29 interest_score: int | None
30 feedback: str | None
31 is_success: bool | None
32 is_skipped: bool | None
33 skip_reason: str | None
34 error: str | None
35 scraped_job_id: int | None
36 user_qualification_id: int | None
37 system_prompt_id: int | None
38 job_prompt_template_id: int | None
39 job_prompt: str | None
40 notes: list[str] = []
43# ----------------------------------------------- JOB RATING SERVICE LOG -----------------------------------------------
46class JobRatingServiceLogOut(Out):
47 """Job Rating Service Log output schema"""
49 run_datetime: dt.datetime
50 run_duration: float | None = None
51 is_success: bool | None = None
52 error_message: str | None = None
53 job_found_ids: list[int] = []
54 job_succeeded_ids: list[int] = []
55 job_failed_ids: list[int] = []
56 job_skipped_ids: list[int] = []
57 user_found_ids: list[int] = []
58 user_processed_ids: list[int] = []
61class JobRatingServiceLogStartRequest(BaseModel):
62 """Job Rating Service Log start request schema"""
64 period_hours: int | None = 3