mirror of https://gitlab.crans.org/bde/nk20
56 lines
1.2 KiB
Python
56 lines
1.2 KiB
Python
|
# Copyright (C) 2018-2021 by BDE ENS Paris-Saclay
|
||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||
|
|
||
|
from rest_framework import serializers
|
||
|
|
||
|
|
||
|
from ..models import Sheet, Food, FoodOption, Meal, Order, OrderedMeal, OrderedFood, SheetOrderTransaction
|
||
|
|
||
|
|
||
|
class SheetSerializer(serializers.ModelSerializer):
|
||
|
class Meta:
|
||
|
model = Sheet
|
||
|
fields = '__all__'
|
||
|
|
||
|
|
||
|
class FoodSerializer(serializers.ModelSerializer):
|
||
|
class Meta:
|
||
|
model = Food
|
||
|
fields = '__all__'
|
||
|
|
||
|
|
||
|
class FoodOptionSerializer(serializers.ModelSerializer):
|
||
|
class Meta:
|
||
|
model = FoodOption
|
||
|
fields = '__all__'
|
||
|
|
||
|
|
||
|
class MealSerializer(serializers.ModelSerializer):
|
||
|
class Meta:
|
||
|
model = Meal
|
||
|
fields = '__all__'
|
||
|
|
||
|
|
||
|
class OrderSerializer(serializers.ModelSerializer):
|
||
|
class Meta:
|
||
|
model = Order
|
||
|
fields = '__all__'
|
||
|
|
||
|
|
||
|
class OrderedMealSerializer(serializers.ModelSerializer):
|
||
|
class Meta:
|
||
|
model = OrderedMeal
|
||
|
fields = '__all__'
|
||
|
|
||
|
|
||
|
class OrderedFoodSerializer(serializers.ModelSerializer):
|
||
|
class Meta:
|
||
|
model = OrderedFood
|
||
|
fields = '__all__'
|
||
|
|
||
|
|
||
|
class SheetOrderTransactionSerializer(serializers.ModelSerializer):
|
||
|
class Meta:
|
||
|
model = SheetOrderTransaction
|
||
|
fields = '__all__'
|