# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-06-13 13:48
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('email2sms', '0002_load_initial_data'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='AddressBlock',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='Created')),
                ('updated', models.DateTimeField(auto_now=True, db_index=True, verbose_name='Updated')),
                ('address_range', models.CharField(max_length=255, verbose_name='Address range')),
                ('street', models.CharField(max_length=255, verbose_name='Street')),
            ],
        ),
        migrations.CreateModel(
            name='District',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('slug', models.SlugField(blank=True, null=True)),
                ('name', models.CharField(max_length=255, verbose_name='Name')),
                ('created', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='Created')),
                ('updated', models.DateTimeField(auto_now=True, db_index=True, verbose_name='Updated')),
                ('trashed', models.BooleanField(db_index=True, default=False)),
                ('district_type', models.CharField(choices=[('TRASH', 'Trash'), ('RECYCLING', 'Recycling')], max_length=50, verbose_name='District type')),
                ('identifier', models.CharField(blank=True, max_length=255, null=True, verbose_name='Identifier')),
                ('pickup_time', models.CharField(max_length=255, verbose_name='Pick up time')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='DistrictExceptions',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('slug', models.SlugField(blank=True, null=True)),
                ('name', models.CharField(max_length=255, verbose_name='Name')),
                ('created', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='Created')),
                ('updated', models.DateTimeField(auto_now=True, db_index=True, verbose_name='Updated')),
                ('trashed', models.BooleanField(db_index=True, default=False)),
                ('date', models.DateField(verbose_name='Date')),
                ('new_date', models.DateField(blank=True, null=True, verbose_name='New date')),
                ('district', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='notifications.District')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Municipality',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('slug', models.SlugField(blank=True, null=True)),
                ('name', models.CharField(max_length=255, verbose_name='Name')),
                ('created', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='Created')),
                ('updated', models.DateTimeField(auto_now=True, db_index=True, verbose_name='Updated')),
                ('trashed', models.BooleanField(db_index=True, default=False)),
                ('districts_map', models.ImageField(blank=True, null=True, upload_to='notifications/maps/', verbose_name='Districts Map')),
                ('state', localflavor.us.models.USStateField()),
                ('population', models.IntegerField(blank=True, null=True, verbose_name='Population')),
                ('approved', models.BooleanField(default=True, verbose_name='Approved')),
                ('zipcode', localflavor.us.models.USZipCodeField()),
                ('contacts', models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Subscription',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='Created')),
                ('updated', models.DateTimeField(auto_now=True, db_index=True, verbose_name='Updated')),
                ('trashed', models.BooleanField(db_index=True, default=False)),
                ('subscription_type', models.CharField(choices=[('SMS', 'Text message'), ('EMAIL', 'Email')], max_length=20, verbose_name='Type')),
                ('phone_number', localflavor.us.models.PhoneNumberField(blank=True, null=True)),
                ('suspended', models.BooleanField(default=False)),
                ('district', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='notifications.District')),
                ('service_provider', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='email2sms.Provider')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='district',
            name='municipality',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='notifications.Municipality'),
        ),
        migrations.AddField(
            model_name='addressblock',
            name='district',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='notifications.District'),
        ),
    ]
