28 lines
430 B
Python
28 lines
430 B
Python
from typing import Union
|
|
from pydantic import BaseModel
|
|
from uuid import UUID
|
|
|
|
|
|
class ParticipantInfo(BaseModel):
|
|
total: int
|
|
remaining: int
|
|
|
|
|
|
class Queue(BaseModel):
|
|
name: str
|
|
description: Union[str, None] = None
|
|
|
|
|
|
class QueueInList(Queue):
|
|
participants: ParticipantInfo
|
|
|
|
class Config:
|
|
from_attributes = True
|
|
|
|
|
|
class QueueInDb(Queue):
|
|
id: UUID
|
|
|
|
class Config:
|
|
from_attributes = True
|