from django.db import models # Create your models here. from django.contrib.auth.models import User # Assuming you're using Django's built-in User model class Report(models.Model): name = models.CharField(max_length=255) # Name of the report created_by = models.ForeignKey( User, on_delete=models.CASCADE, related_name="reports" ) # Reference to the user who created the report created_at = models.DateTimeField(auto_now_add=True) # Automatically set when created updated_at = models.DateTimeField(auto_now=True) # Automatically updated when modified def __str__(self): return self.name