mirror of
https://github.com/ae-utbm/sith.git
synced 2026-04-28 17:46:02 +00:00
replace drf by django-ninja
This commit is contained in:
@@ -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