from rest_framework import serializers
from .models import Author


class AuthorSerializer(serializers.ModelSerializer):
    auther_photo = serializers.ImageField(required=False)
    class Meta:
        model = Author
        fields = ['id', 'first_name','last_name','auther_photo']