from django.db import models import uuid class APIKey(models.Model): key = models.UUIDField(default=uuid.uuid4, editable=False, unique=True) name = models.CharField(max_length=100, help_text='A name for the API key owner') created_at = models.DateTimeField(auto_now_add=True) is_active = models.BooleanField(default=True) def __str__(self): return f"{self.name} - {self.key}"