from django.db import models class QRCode(models.Model): name = models.CharField(max_length=255,blank=True, null=True) data = models.JSONField(help_text="A JSON list of URLs to be encoded into the QR code",blank=True, null=True) # Store raw decoded data image_path = models.CharField(max_length=255, blank=True, null=True) # To store the QR code image path created_at = models.DateTimeField(auto_now_add=True) def __str__(self): return self.name class MergedQRCode(models.Model): original_qrcodes = models.ManyToManyField(QRCode, related_name='merged_qrcodes') # Reference to the original QR codes image_path = models.CharField(max_length=255, blank=True, null=True) # To store the merged QR code image merged_data = models.TextField(blank=True, null=True) # Store the combined data from the original QR codes created_at = models.DateTimeField(auto_now_add=True) def __str__(self): return f"MergedQRCode {self.id}"