from django.db import models


class Project(models.Model):
    name = models.TextField()
    stats_link = models.TextField(null=True, blank=True)
    stats_cron = models.TextField(null=True, blank=True)
    stats_enabled = models.BooleanField(default=False)
    next_stats_fetch_time = models.DateTimeField(null=True, blank=True)

    class Meta:
        indexes = [
            models.Index(fields=['next_stats_fetch_time', 'stats_enabled'])
        ]
