File size: 750 Bytes
1ff6afc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from dataclasses import dataclass
from datetime import datetime
from typing import List, Dict
from src.domain.enums.interview_status import InterviewStatus
from src.domain.enums.emotion_types import EmotionType


@dataclass
class Interview:
    id: str
    candidate_id: str
    job_id: str
    video_path: str
    status: InterviewStatus
    questions: List[str]
    responses_transcription: List[str]
    timestamp: datetime
    duration: int
    emotional_analysis: Dict[EmotionType, float]

    def is_completed(self) -> bool:
        return self.status == InterviewStatus.COMPLETED

    def is_reviewable(self) -> bool:
        return self.status in [
            InterviewStatus.COMPLETED,
            InterviewStatus.PENDING_REVIEW,
        ]