added api/pk/satellite, authorisation endpointsm, pagination
This commit is contained in:
parent
cc5187c3a1
commit
8225b18a2a
16 changed files with 284 additions and 26 deletions
|
|
@ -18,3 +18,16 @@ class UserPrediction(models.Model):
|
|||
prediction = models.ForeignKey("Prediction", on_delete=models.CASCADE)
|
||||
created_at = models.DateTimeField()
|
||||
|
||||
class Satellite(models.Model):
|
||||
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||||
name = models.CharField(max_length=100)
|
||||
|
||||
class TelemetryPacket(models.Model):
|
||||
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||||
satellite = models.ForeignKey(Satellite, on_delete=models.CASCADE, related_name="telemetry")
|
||||
timestamp = models.BigIntegerField() # unix time
|
||||
lat = models.FloatField()
|
||||
lon = models.FloatField()
|
||||
alt = models.FloatField()
|
||||
payload = models.JSONField(null=True, blank=True)
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
Loading…
Add table
Add a link
Reference in a new issue