mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-11 12:29:24 +00:00
replace drf by django-ninja
This commit is contained in:
13
counter/schemas.py
Normal file
13
counter/schemas.py
Normal file
@ -0,0 +1,13 @@
|
||||
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"]
|
Reference in New Issue
Block a user