2017-01-03 19:55:01 +01:00
|
|
|
from rest_framework import serializers
|
|
|
|
|
2018-02-19 10:33:09 +01:00
|
|
|
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:
|
2018-02-19 10:33:09 +01:00
|
|
|
model = ClientData
|
2018-02-11 11:27:27 +01:00
|
|
|
fields = ('uuid', 'last_seen')
|