latest changes before manual submissions redesign
This commit is contained in:
@@ -29,3 +29,15 @@ class UserSettings(models.Model):
|
||||
|
||||
def __str__(self):
|
||||
return _("Settings for %(user)s") % {"user": self.user}
|
||||
|
||||
|
||||
class PendingNotificationBatch(models.Model):
|
||||
"""One minute of new Pending events for one notification recipient."""
|
||||
|
||||
user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
|
||||
minute = models.DateTimeField()
|
||||
manual_count = models.PositiveIntegerField(default=0)
|
||||
sensor_count = models.PositiveIntegerField(default=0)
|
||||
|
||||
class Meta:
|
||||
constraints = [models.UniqueConstraint(fields=["user", "minute"], name="unique_pending_notification_minute")]
|
||||
|
||||
Reference in New Issue
Block a user