|
from typing import Any, Optional
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class ErrorData(BaseModel):
|
|
error_code: int
|
|
error_text: str
|
|
|
|
|
|
class Response[T](BaseModel):
|
|
error: bool = False
|
|
response: T | ErrorData
|
|
|
|
|
|
# Constants
|
|
NOT_FOUND = ErrorData(error_code=1, error_text='Not Found')
|