Sith/counter/schemas.py

14 lines
303 B
Python
Raw Normal View History

2024-07-18 18:23:30 +00:00
from ninja import ModelSchema
from core.schemas import SimpleUserSchema
from counter.models import Counter
class CounterSchema(ModelSchema):
barmen_list: list[SimpleUserSchema]
is_open: bool
class Meta:
model = Counter
fields = ["id", "name", "type", "club", "products"]