23 lines
No EOL
629 B
Python
23 lines
No EOL
629 B
Python
from pydantic import BaseModel, Field
|
|
from datetime import datetime
|
|
from typing import Optional
|
|
|
|
class AiInteractionBase(BaseModel):
|
|
job_offer_text: str
|
|
cv_text_used: Optional[str] = None
|
|
interaction_type: str = "scoring" # Valeur par défaut
|
|
|
|
class AiInteractionCreate(AiInteractionBase):
|
|
ai_request: str
|
|
ai_response: str
|
|
score: Optional[float] = None
|
|
analysis_results: Optional[str] = None
|
|
user_id: Optional[int] = None
|
|
document_id: Optional[int] = None
|
|
|
|
class AiInteractionResponse(AiInteractionCreate):
|
|
id: int
|
|
created_at: datetime
|
|
|
|
class Config:
|
|
from_attributes = True |