from django.db import models
from .user import CustomUser

class Suggestion(models.Model):
    url = models.URLField()
    description = models.TextField()
    suggested_by = models.ForeignKey(CustomUser, on_delete=models.SET_NULL, null=True)
    created_at = models.DateTimeField(auto_now_add=True)
    is_approved = models.BooleanField(default=False)

    def __str__(self):
        return self.url