mirror of
https://github.com/onyx-dot-app/onyx.git
synced 2026-10-23 03:42:59 -05:00
34 lines
582 B
Python
34 lines
582 B
Python
from typing import Generic
|
|
from typing import Optional
|
|
from typing import TypeVar
|
|
from uuid import UUID
|
|
|
|
from pydantic import BaseModel
|
|
from pydantic.generics import GenericModel
|
|
|
|
|
|
DataT = TypeVar("DataT")
|
|
|
|
|
|
class StatusResponse(GenericModel, Generic[DataT]):
|
|
success: bool
|
|
message: Optional[str] = None
|
|
data: Optional[DataT] = None
|
|
|
|
|
|
class ApiKey(BaseModel):
|
|
api_key: str
|
|
|
|
|
|
class IdReturn(BaseModel):
|
|
id: int
|
|
|
|
|
|
class MinimalUserSnapshot(BaseModel):
|
|
id: UUID
|
|
email: str
|
|
|
|
|
|
class DisplayPriorityRequest(BaseModel):
|
|
display_priority_map: dict[int, int]
|