2018-03-30 02:59:51 +00:00
|
|
|
from rest_framework.serializers import (IntegerField,
|
|
|
|
ModelSerializer,
|
2019-06-04 18:26:09 +00:00
|
|
|
Serializer)
|
2018-03-30 02:59:51 +00:00
|
|
|
|
|
|
|
from profiles.models import SongRequest
|
2018-04-05 20:22:15 +00:00
|
|
|
from .radio import RadioSongSerializer
|
2018-03-30 02:59:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
class JustPlayedSerializer(Serializer):
|
|
|
|
song_request = IntegerField()
|
|
|
|
|
|
|
|
|
|
|
|
class MakeRequestSerializer(Serializer):
|
|
|
|
song = IntegerField()
|
|
|
|
|
|
|
|
|
|
|
|
class GetRequestSerializer(ModelSerializer):
|
2018-04-05 20:22:15 +00:00
|
|
|
song = RadioSongSerializer()
|
2018-03-30 02:59:51 +00:00
|
|
|
|
|
|
|
class Meta:
|
|
|
|
model = SongRequest
|
|
|
|
fields = ('id', 'song')
|