Commit 91dadf3e authored by Thomas Kolb's avatar Thomas Kolb Committed by Hubert Denkmair
Browse files

Added model for live stats

parent d71976fd
......@@ -49,6 +49,17 @@ class UserProfile(models.Model):
self.viewer_key = random.getrandbits(63)
super(UserProfile, self).save(*args, **kwargs)
class LiveStats(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE, primary_key=True)
last_update_frame = models.IntegerField(blank=True, null=True)
mass = models.FloatField(blank=True, null=True)
natural_food_consumed = models.FloatField(blank=True, null=True)
carrison_food_consumed = models.FloatField(blank=True, null=True)
hunted_food_consumed = models.FloatField(blank=True, null=True)
objects = models.Manager()
class SnakeGame(models.Model):
snake_version = models.ForeignKey(SnakeVersion, on_delete=models.CASCADE)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment