added api/pk/satellite, authorisation endpointsm, pagination

This commit is contained in:
afanasyev.aa 2025-04-05 23:49:07 +09:00
parent cc5187c3a1
commit 8225b18a2a
16 changed files with 284 additions and 26 deletions

View file

@ -0,0 +1,35 @@
# Generated by Django 5.1.7 on 2025-04-05 13:30
import django.db.models.deletion
import uuid
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api', '0003_alter_userprediction_unique_together_and_more'),
]
operations = [
migrations.CreateModel(
name='Satellite',
fields=[
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('name', models.CharField(max_length=100)),
],
),
migrations.CreateModel(
name='TelemetryPacket',
fields=[
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('timestamp', models.BigIntegerField()),
('lat', models.FloatField()),
('lon', models.FloatField()),
('alt', models.FloatField()),
('payload', models.JSONField(blank=True, null=True)),
('created_at', models.DateTimeField(auto_now_add=True)),
('satellite', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='telemetry', to='api.satellite')),
],
),
]