Added dev_note field to player

This commit is contained in:
Walter 2025-02-21 07:43:38 +01:00
parent 295a3bb087
commit c2361a2afc
2 changed files with 2 additions and 3 deletions

View File

@ -156,4 +156,4 @@ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
CRISPY_ALLOWED_TEMPLATE_PACKS = "bootstrap4" CRISPY_ALLOWED_TEMPLATE_PACKS = "bootstrap4"
CRISPY_TEMPLATE_PACK = "bootstrap4" CRISPY_TEMPLATE_PACK = "bootstrap4"
CRISPY_FAIL_SILENTLY = not DEBUG CRISPY_FAIL_SILENTLY = not DEBUG

View File

@ -31,6 +31,7 @@ class Player(models.Model):
latest_activity = models.DateTimeField(default=timezone.now) latest_activity = models.DateTimeField(default=timezone.now)
suspected_cheater = models.BooleanField(default=False) # This should be set when tripping the anti-cheat suspected_cheater = models.BooleanField(default=False) # This should be set when tripping the anti-cheat
invite_code = models.ForeignKey(InviteCode, null=True, blank=True, on_delete=models.CASCADE) invite_code = models.ForeignKey(InviteCode, null=True, blank=True, on_delete=models.CASCADE)
dev_note = models.TextField(max_length=1024, null=True, blank=True)
# States # States
suspended = models.BooleanField(default=False) # This is a shadow-ban, stats will still save but not all will show up on leaderboards suspended = models.BooleanField(default=False) # This is a shadow-ban, stats will still save but not all will show up on leaderboards
banned = models.BooleanField(default=False) # Account gets logged out upon logging in banned = models.BooleanField(default=False) # Account gets logged out upon logging in
@ -60,8 +61,6 @@ class Player(models.Model):
return f"{states}{self.user} - {self.latest_ip}".strip(" ") return f"{states}{self.user} - {self.latest_ip}".strip(" ")
class Log(models.Model): class Log(models.Model):
class Actions(models.IntegerChoices): class Actions(models.IntegerChoices):
login = 0, "Logged in" login = 0, "Logged in"