60 lines
1.0 KiB
Python
60 lines
1.0 KiB
Python
from datetime import datetime
|
|
from uuid import UUID
|
|
from ninja import Schema
|
|
|
|
|
|
class ScopeOut(Schema):
|
|
id: UUID
|
|
name: str
|
|
is_active: bool
|
|
created_at: datetime
|
|
|
|
|
|
class SyncScopesIn(Schema):
|
|
apibot_token: str | None = None
|
|
|
|
|
|
class SyncScopesOut(Schema):
|
|
# False when a sync loop was already running for this game
|
|
started: bool
|
|
|
|
|
|
class ImageCropIn(Schema):
|
|
x1: int
|
|
y1: int
|
|
x2: int
|
|
y2: int
|
|
label: str | None = None
|
|
|
|
|
|
class ImageCropOut(Schema):
|
|
id: UUID
|
|
x1: int
|
|
y1: int
|
|
x2: int
|
|
y2: int
|
|
label: str
|
|
ocr_status: str
|
|
ocr_raw_data: str
|
|
created_at: datetime
|
|
|
|
|
|
class SubmissionFileOut(Schema):
|
|
id: UUID
|
|
original_filename: str
|
|
content_type: str
|
|
file_size: int
|
|
file_url: str | None = None
|
|
ocr_status: str
|
|
ocr_raw_data: str
|
|
crops: list[ImageCropOut] = []
|
|
|
|
|
|
class SubmissionOut(Schema):
|
|
id: UUID
|
|
scope_id: UUID
|
|
notes: str | None = None
|
|
files: list[SubmissionFileOut] = []
|
|
created_at: datetime
|
|
updated_at: datetime
|