from typing import override

from template_project.application.common.errors import ApplicationError, to_error
from template_project.application.resume.entity import ResumeId, ResumePredictionId


@to_error
class ResumeNotFoundError(ApplicationError):
    resume_id: ResumeId

    @override
    def __str__(self) -> str:
        return f"Resume with {self.resume_id!r} not found"


@to_error
class ResumePredictionNotFoundError(ApplicationError):
    resume_prediction_id: ResumePredictionId

    @override
    def __str__(self) -> str:
        return f"ResumePrediction with {self.resume_prediction_id!r} not found"


@to_error
class ResumeDoesBelongUserError(ApplicationError):
    pass
