backend for queues & minor front tweaks
This commit is contained in:
27
backend/app/views/queue/schemas.py
Normal file
27
backend/app/views/queue/schemas.py
Normal file
@ -0,0 +1,27 @@
|
||||
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
|
||||
Reference in New Issue
Block a user