carom-server/billard/serializers.py

16 lines
431 B
Python
Raw Normal View History

2017-01-03 19:55:01 +01:00
from rest_framework import serializers
from billard.models import LocationData, ClientData
2018-02-11 10:56:44 +01:00
2017-01-03 19:55:01 +01:00
2017-01-06 20:24:36 +01:00
class LocationDataSerializer(serializers.HyperlinkedModelSerializer):
2017-01-06 19:11:29 +01:00
class Meta:
2017-01-06 20:24:36 +01:00
model = LocationData
2017-02-11 10:32:24 +01:00
fields = ('client_id', 'desk_no', 'tst', 'on_off',)
2018-02-11 11:27:27 +01:00
class ClientUpdateLastSeenSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = ClientData
2018-02-11 11:27:27 +01:00
fields = ('uuid', 'last_seen')