"""Job schemas."""

from __future__ import annotations

from datetime import datetime
from enum import Enum

from pydantic import BaseModel


class JobStatus(str, Enum):
    """Job status enum."""

    PENDING = "pending"
    STARTED = "started"
    PROGRESS = "progress"
    SUCCESS = "success"
    FAILURE = "failure"
    CANCELLED = "cancelled"


class JobResponse(BaseModel):
    """Job response schema."""

    id: str
    status: JobStatus
    progress: int = 0
    message: str = ""
    created_at: datetime
    updated_at: datetime

