from rest_framework import serializers from .models import QRCode ,MergedQRCode class QRCodeSerializer(serializers.ModelSerializer): class Meta: model = QRCode fields = ['id', 'name','data','image_path' ,'created_at'] class MergedQRCodeSerializer(serializers.ModelSerializer): original_qrcodes = QRCodeSerializer(many=True) class Meta: model = MergedQRCode fields = ['id', 'original_qrcodes', 'image_path','merged_data']