mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-10 00:03:24 +00:00
14 lines
303 B
Python
14 lines
303 B
Python
|
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"]
|