models.py 652 B

123456789101112131415161718192021
  1. from django.db import models
  2. class Marker(models.Model):
  3. timestamp = models.DateTimeField(unique=True)
  4. lat = models.FloatField()
  5. lng = models.FloatField()
  6. alt = models.FloatField()
  7. hdop = models.IntegerField()
  8. speed = models.IntegerField(null=True, blank=True)
  9. class Trip(models.Model):
  10. startTime = models.DateTimeField()
  11. endTime = models.DateTimeField()
  12. name = models.CharField(max_length=255)
  13. description = models.TextField(null=True, blank=True)
  14. class CensoredLocation(models.Model):
  15. lat = models.FloatField()
  16. lng = models.FloatField()
  17. radius = models.IntegerField(default=800)
  18. name = models.CharField(max_length=255)