from rest_framework import serializers
from .models import Notification


class NotificationSerializer(serializers.ModelSerializer):
    class Meta:
        model = Notification
        fields = [
            'id', 'title', 'text', 'notification_type', 'action_url',
            'is_read', 'read_at', 'created_at', 'bulk', 'send_email',
        ]
        read_only_fields = [
            'id', 'title', 'text', 'notification_type', 'action_url',
            'is_read', 'read_at', 'created_at', 'bulk', 'send_email',
        ]
