mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-16 11:13:23 +00:00
16 lines
386 B
Python
16 lines
386 B
Python
from rest_framework import serializers
|
|
from counter.models import Counter
|
|
|
|
|
|
class Counter(serializers.ModelSerializer):
|
|
|
|
is_open = serializers.BooleanField(read_only=True)
|
|
barman_list = serializers.ListField(
|
|
child = serializers.IntegerField()
|
|
)
|
|
|
|
class Meta:
|
|
model = Counter
|
|
fields = ('id', 'name', 'type', 'is_open', 'barman_list')
|
|
|