from rest_framework import serializers

from fwd_api.models import SubscriptionRequest


class ReportSerializer(serializers.Serializer):

    files = serializers.FileField(required=False)
    requestId = serializers.CharField(required=False)

    def create(self, validated_data):
        """
        Create and return a new `Snippet` instance, given the validated data.
        """
        return SubscriptionRequest.objects.create(**validated_data)


    def update(self, instance, validated_data):
        return instance
