carom-server/billard/serializers.py
2017-02-01 13:52:30 +01:00

27 lines
679 B
Python

from billard.models import *
from rest_framework import serializers
class ClientSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
#model = Client
fields = ('id', 'location',)
class LocationSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
#model = Location
fields = ('name',)
class TableSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
#model = Table
fields = ('client', 'number', 'name',)
class LocationDataSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = LocationData
fields = ('location_id', 'table_no', 'tst', 'on_off',)