from django.db import models class Location(models.Model): name = models.CharField(max_length=200) address = models.TextField(blank=True) club = models.ForeignKey('clubs.Club', on_delete=models.CASCADE, related_name='locations', null=True, blank=True) is_active = models.BooleanField(default=True) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) class Meta: ordering = ['name'] verbose_name_plural = 'Locations' indexes = [ models.Index(fields=['club']), ] def __str__(self): return self.name