Files
nonebot-plugin-tetris-stats/nonebot_plugin_tetris_stats/games/tetrio/api/schemas/base.py
2024-05-16 05:59:18 +08:00

21 lines
334 B
Python

from datetime import datetime
from typing import Literal
from pydantic import BaseModel
class Cache(BaseModel):
status: str
cached_at: datetime
cached_until: datetime
class SuccessModel(BaseModel):
success: Literal[True]
cache: Cache
class FailedModel(BaseModel):
success: Literal[False]
error: str