# -*- coding: utf-8 -*-
# Generated by Django 1.11.12 on 2018-04-30 16:25
from __future__ import unicode_literals

from django.conf import settings
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
import everyvoter_common.utils.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='GeoLookup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('modified_at', models.DateTimeField(auto_now=True)),
                ('lookup', models.CharField(help_text=b'Address provided by user', max_length=255, verbose_name=b'Lookup')),
                ('response', django.contrib.postgres.fields.jsonb.JSONField()),
            ],
            options={
                'verbose_name': 'Geocoding Lookup',
                'verbose_name_plural': 'Geocoding Lookups',
            },
            bases=(everyvoter_common.utils.models.CacheMixinModel, models.Model),
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('modified_at', models.DateTimeField(auto_now=True)),
                ('formatted_address', models.CharField(max_length=255, verbose_name=b'Address')),
                ('lookups', models.ManyToManyField(to='location.GeoLookup')),
            ],
            options={
                'verbose_name': 'Location',
                'verbose_name_plural': 'Locations',
            },
            bases=(everyvoter_common.utils.models.CacheMixinModel, models.Model),
        ),
        migrations.CreateModel(
            name='UserLocation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('modified_at', models.DateTimeField(auto_now=True)),
                ('location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='location.Location')),
            ],
            options={
                'verbose_name': 'User Location',
                'verbose_name_plural': 'User Locations',
            },
            bases=(everyvoter_common.utils.models.CacheMixinModel, models.Model),
        ),
    ]
