# Generated by Django 3.2.8 on 2021-11-03 11:16

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Device',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('tid', models.CharField(max_length=2)),
                ('desc', models.TextField()),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Waypoint',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rad', models.PositiveIntegerField(verbose_name='radius')),
                ('tst', models.DateTimeField()),
                ('rid', models.CharField(max_length=10, verbose_name='region id')),
                ('lon', models.FloatField(verbose_name='longitude')),
                ('lat', models.FloatField(verbose_name='latitude')),
                ('desc', models.TextField(verbose_name='description')),
            ],
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField()),
                ('lon', models.FloatField(verbose_name='longitude')),
                ('lat', models.FloatField(verbose_name='latitude')),
                ('extra', models.JSONField()),
                ('device', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='owntracks.device')),
            ],
            options={
                'ordering': ['-timestamp'],
            },
        ),
    ]
