mirror of
https://github.com/rommapp/romm.git
synced 2026-02-18 00:27:41 +01:00
43 lines
731 B
Python
43 lines
731 B
Python
from typing import Optional
|
|
|
|
from pydantic import BaseModel
|
|
from typing_extensions import TypedDict
|
|
|
|
|
|
class BaseAsset(BaseModel):
|
|
id: int
|
|
file_name: str
|
|
file_name_no_tags: str
|
|
file_extension: str
|
|
file_path: str
|
|
file_size_bytes: int
|
|
full_path: str
|
|
download_path: str
|
|
|
|
class Config:
|
|
from_attributes = True
|
|
|
|
|
|
class SaveSchema(BaseAsset):
|
|
rom_id: int
|
|
emulator: Optional[str]
|
|
|
|
|
|
class UploadedSavesResponse(TypedDict):
|
|
uploaded: int
|
|
saves: list[SaveSchema]
|
|
|
|
|
|
class StateSchema(BaseAsset):
|
|
rom_id: int
|
|
emulator: Optional[str]
|
|
|
|
|
|
class UploadedStatesResponse(TypedDict):
|
|
uploaded: int
|
|
states: list[StateSchema]
|
|
|
|
|
|
class ScreenshotSchema(BaseAsset):
|
|
rom_id: int
|