"""
Serializers for reports app.
"""
from rest_framework import serializers
from .models import Report, ReportTemplate


class ReportSerializer(serializers.ModelSerializer):
    """Serializer for Report model."""
    class Meta:
        model = Report
        fields = '__all__'
        read_only_fields = ('id', 'user', 'created_at', 'updated_at', 'file_size', 'error_message')


class ReportTemplateSerializer(serializers.ModelSerializer):
    """Serializer for ReportTemplate model."""
    class Meta:
        model = ReportTemplate
        fields = '__all__'
        read_only_fields = ('id', 'created_at', 'updated_at')

