# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-05-02 06:22
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='AlertSent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_time', models.DateTimeField()),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='AlertToSend',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('days_requested', models.PositiveIntegerField()),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Artist',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('slug', models.SlugField(max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('place', models.CharField(max_length=100)),
                ('lat', models.FloatField(blank=True, null=True, verbose_name='Latitude')),
                ('lng', models.FloatField(blank=True, null=True, verbose_name='Longitude')),
            ],
        ),
        migrations.CreateModel(
            name='AlertDefinition',
            fields=[
                ('location_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='fma.Location')),
                ('name', models.CharField(max_length=50)),
                ('alert_type', models.CharField(choices=[('RADIUS', 'Radius'), ('LON_EAST', 'Longitude - East'), ('LON_WEST', 'Longitude - West'), ('LAT_NORTH', 'Latitude - North'), ('LAT_SOUTH', 'Latitude - South'), ('REGION', 'Region'), ('LOCATION', 'Specific Location')], default='RADIUS', max_length=20, verbose_name='Select by')),
                ('distance', models.PositiveIntegerField(default=20000, verbose_name='Radius')),
                ('days_list', models.CharField(help_text='How many days before the event takes place you will be notified', max_length=100, null=True)),
                ('alert_time', models.TimeField(help_text='The time in the day that you would like to receive the notification (optional).', null=True, verbose_name='Notification time')),
                ('artists', models.ManyToManyField(to='fma.Artist')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            bases=('fma.location',),
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('location_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='fma.Location')),
                ('name', models.CharField(max_length=100)),
                ('date', models.DateTimeField()),
                ('artists', models.ManyToManyField(to='fma.Artist')),
            ],
            bases=('fma.location',),
        ),
        migrations.AddField(
            model_name='alerttosend',
            name='event',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='fma.Event'),
        ),
        migrations.AddField(
            model_name='alertsent',
            name='event',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='fma.Event'),
        ),
    ]
