25 lines
678 B
Python
25 lines
678 B
Python
from datetime import date, datetime
|
|
from typing import Optional, Dict
|
|
|
|
from pydantic import BaseModel, ConfigDict
|
|
|
|
from app.core.refdata import ReconJobStatus
|
|
|
|
|
|
class ReconJob(BaseModel):
|
|
"""Pydantic representation of the `recon_jobs` row (see `app.db.schema.ReconJob`)."""
|
|
|
|
model_config = ConfigDict(from_attributes=True, use_enum_values=True)
|
|
|
|
id: int
|
|
name: str
|
|
due_datetime: Optional[datetime] = None
|
|
start_datetime: Optional[datetime] = None
|
|
finish_datetime: Optional[datetime] = None
|
|
as_at_date: date
|
|
status: ReconJobStatus
|
|
status_reason: str = ""
|
|
recon_config_reference: str
|
|
username: str
|
|
results: Optional[Dict] = None
|