<gh_stars>0
from rest_framework import serializers

from .models import Provider, SafeApp


class ProviderSerializer(serializers.ModelSerializer):
    class Meta:
        model = Provider
        fields = ["url", "name"]


class SafeAppsResponseSerializer(serializers.ModelSerializer):
    provider = ProviderSerializer()

    class Meta:
        model = SafeApp
        fields = ["url", "name", "icon_url", "description", "networks", "provider"]
