# Generated by Django 4.0.2 on 2022-02-22 01:25

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='GeoIP',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('hostname', models.CharField(blank=True, default=None, max_length=255, null=True)),
                ('ip', models.CharField(max_length=64)),
                ('isp', models.CharField(max_length=84)),
                ('city', models.CharField(blank=True, max_length=64, null=True)),
                ('state', models.CharField(blank=True, max_length=64, null=True)),
                ('country', models.CharField(blank=True, max_length=64, null=True)),
                ('postal', models.CharField(blank=True, max_length=32, null=True)),
                ('lat', models.FloatField(blank=True, default=0.0)),
                ('lng', models.FloatField(blank=True, default=0.0)),
            ],
            bases=(models.Model, rest.models.RestModel),
        ),
        migrations.CreateModel(
            name='GeoLocation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('city', models.CharField(blank=True, max_length=64, null=True)),
                ('county', models.CharField(max_length=64)),
                ('state', models.CharField(max_length=2)),
                ('zip', models.CharField(max_length=32)),
                ('country', models.CharField(max_length=64)),
                ('area_codes', models.CharField(max_length=64)),
                ('timezone', models.CharField(max_length=32)),
                ('kind', models.CharField(max_length=32)),
                ('lat', models.FloatField(blank=True, default=0.0)),
                ('lng', models.FloatField(blank=True, default=0.0)),
            ],
            bases=(models.Model, rest.models.RestModel),
        ),
        migrations.CreateModel(
            name='GeoTrack',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('uid', models.CharField(db_index=True, default=None, max_length=124, null=True)),
                ('name', models.CharField(max_length=124)),
                ('kind', models.CharField(max_length=64)),
                ('ref_id', models.IntegerField(blank=True, default=0)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('owner', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            bases=(models.Model, rest.models.RestModel),
        ),
        migrations.CreateModel(
            name='GeoPosition',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('uid', models.CharField(db_index=True, default=None, max_length=124, null=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('lat', models.FloatField(default=0.0)),
                ('lng', models.FloatField(default=0.0)),
                ('elevation', models.FloatField(blank=True, default=0.0)),
                ('accuracy', models.FloatField(blank=True, default=0.0)),
                ('altitude', models.FloatField(blank=True, default=0.0)),
                ('altitudeAccuracy', models.FloatField(blank=True, default=0.0)),
                ('heading', models.FloatField(blank=True, default=0.0)),
                ('speed', models.FloatField(blank=True, default=0.0)),
                ('track', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='positions', to='location.geotrack')),
            ],
            bases=(models.Model, rest.models.RestModel),
        ),
        migrations.CreateModel(
            name='GeoIPLocation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('obj_id', models.IntegerField(blank=True, default=0)),
                ('obj_kind', models.CharField(blank=True, default='', max_length=64, null=True)),
                ('ip', models.CharField(max_length=32)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('city', models.CharField(blank=True, max_length=64, null=True)),
                ('region', models.CharField(max_length=64)),
                ('country', models.CharField(max_length=64)),
                ('area_codes', models.CharField(max_length=64)),
                ('timezone', models.CharField(max_length=32)),
                ('kind', models.CharField(max_length=32)),
                ('lat', models.FloatField(blank=True, default=0.0)),
                ('lng', models.FloatField(blank=True, default=0.0)),
                ('owner', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='locations', to=settings.AUTH_USER_MODEL)),
            ],
            bases=(models.Model, rest.models.RestModel),
        ),
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('modified', models.DateTimeField(auto_now=True)),
                ('line1', models.CharField(blank=True, default=None, max_length=255, null=True)),
                ('line2', models.CharField(blank=True, default=None, max_length=255, null=True)),
                ('city', models.CharField(blank=True, default=None, max_length=127, null=True)),
                ('state', models.CharField(blank=True, default=None, max_length=127, null=True)),
                ('county', models.CharField(blank=True, default=None, max_length=127, null=True)),
                ('country', models.CharField(blank=True, default=None, max_length=16, null=True)),
                ('postalcode', models.CharField(blank=True, default=None, max_length=32, null=True)),
                ('lat', models.FloatField(blank=True, default=0.0)),
                ('lng', models.FloatField(blank=True, default=0.0)),
                ('modified_by', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            bases=(models.Model, rest.models.RestModel),
        ),
    ]
