|
@ -56,7 +56,7 @@ class Check(models.Model): |
|
|
name = models.CharField(max_length=100, blank=True) |
|
|
name = models.CharField(max_length=100, blank=True) |
|
|
tags = models.CharField(max_length=500, blank=True) |
|
|
tags = models.CharField(max_length=500, blank=True) |
|
|
code = models.UUIDField(default=uuid.uuid4, editable=False, db_index=True) |
|
|
code = models.UUIDField(default=uuid.uuid4, editable=False, db_index=True) |
|
|
user = models.ForeignKey(User, blank=True, null=True) |
|
|
|
|
|
|
|
|
user = models.ForeignKey(User, models.CASCADE, blank=True, null=True) |
|
|
created = models.DateTimeField(auto_now_add=True) |
|
|
created = models.DateTimeField(auto_now_add=True) |
|
|
kind = models.CharField(max_length=10, default="simple", |
|
|
kind = models.CharField(max_length=10, default="simple", |
|
|
choices=CHECK_KINDS) |
|
|
choices=CHECK_KINDS) |
|
@ -204,7 +204,7 @@ class Check(models.Model): |
|
|
|
|
|
|
|
|
class Ping(models.Model): |
|
|
class Ping(models.Model): |
|
|
n = models.IntegerField(null=True) |
|
|
n = models.IntegerField(null=True) |
|
|
owner = models.ForeignKey(Check) |
|
|
|
|
|
|
|
|
owner = models.ForeignKey(Check, models.CASCADE) |
|
|
created = models.DateTimeField(auto_now_add=True) |
|
|
created = models.DateTimeField(auto_now_add=True) |
|
|
scheme = models.CharField(max_length=10, default="http") |
|
|
scheme = models.CharField(max_length=10, default="http") |
|
|
remote_addr = models.GenericIPAddressField(blank=True, null=True) |
|
|
remote_addr = models.GenericIPAddressField(blank=True, null=True) |
|
@ -214,7 +214,7 @@ class Ping(models.Model): |
|
|
|
|
|
|
|
|
class Channel(models.Model): |
|
|
class Channel(models.Model): |
|
|
code = models.UUIDField(default=uuid.uuid4, editable=False) |
|
|
code = models.UUIDField(default=uuid.uuid4, editable=False) |
|
|
user = models.ForeignKey(User) |
|
|
|
|
|
|
|
|
user = models.ForeignKey(User, models.CASCADE) |
|
|
created = models.DateTimeField(auto_now_add=True) |
|
|
created = models.DateTimeField(auto_now_add=True) |
|
|
kind = models.CharField(max_length=20, choices=CHANNEL_KINDS) |
|
|
kind = models.CharField(max_length=20, choices=CHANNEL_KINDS) |
|
|
value = models.TextField(blank=True) |
|
|
value = models.TextField(blank=True) |
|
@ -378,9 +378,9 @@ class Notification(models.Model): |
|
|
get_latest_by = "created" |
|
|
get_latest_by = "created" |
|
|
|
|
|
|
|
|
code = models.UUIDField(default=uuid.uuid4, null=True, editable=False) |
|
|
code = models.UUIDField(default=uuid.uuid4, null=True, editable=False) |
|
|
owner = models.ForeignKey(Check) |
|
|
|
|
|
|
|
|
owner = models.ForeignKey(Check, models.CASCADE) |
|
|
check_status = models.CharField(max_length=6) |
|
|
check_status = models.CharField(max_length=6) |
|
|
channel = models.ForeignKey(Channel) |
|
|
|
|
|
|
|
|
channel = models.ForeignKey(Channel, models.CASCADE) |
|
|
created = models.DateTimeField(auto_now_add=True) |
|
|
created = models.DateTimeField(auto_now_add=True) |
|
|
error = models.CharField(max_length=200, blank=True) |
|
|
error = models.CharField(max_length=200, blank=True) |
|
|
|
|
|
|
|
|