models.py 612 B

1234567891011121314151617181920
  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. location = 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. name = models.CharField(max_length=255)