ScanOS/backend/app/data/schemas.py

15 lines
320 B
Python
Raw Normal View History

2023-09-21 14:56:01 +02:00
from pydantic import BaseModel
2024-07-07 00:30:13 +02:00
from typing import Optional
2023-09-21 14:56:01 +02:00
import app.scanner.enums as scan
class ScanPage(BaseModel):
2024-07-07 00:30:13 +02:00
filename: Optional[str]
2023-09-21 14:56:01 +02:00
size_bytes: int
2024-07-07 00:30:13 +02:00
status: scan.PageStatus
2023-09-21 14:56:01 +02:00
class Config():
orm_mode = True
class ScanStatus(BaseModel):
pages: list[ScanPage]
status: scan.Status