"""File containing member serializers."""

from rest_framework import serializers
from members.models import Member


class MemberSerializer(serializers.ModelSerializer):
    """Model serializer for member."""

    paid = serializers.DateTimeField(source="last_paid")

    class Meta:
        """Meta of member serializer."""

        model = Member
        fields = (
            "id",
            "first_name",
            "last_name",
            "email",
            "POR",
            "AYY",
            "jas",
            "created",
            "paid",
        )
