# Generated by Django 2.2.6 on 2019-11-12 20:59

import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import re


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Activity',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, default='Social', max_length=50, null=True, validators=[django.core.validators.MaxLengthValidator(50)])),
                ('description', models.CharField(blank=True, max_length=200, null=True, validators=[django.core.validators.MaxLengthValidator(200)])),
                ('type', models.CharField(choices=[('Dance party', (('sc', 'Social'), ('gl', 'Gala'))), ('ws', 'Workshop'), ('sh', 'Show'), ('cl', 'Class'), ('br', 'Break'), ('ot', 'Other')], default='sc', max_length=2, validators=[django.core.validators.MaxLengthValidator(2)])),
                ('start', models.DateTimeField()),
                ('end', models.DateTimeField()),
                ('artist', models.CharField(blank=True, max_length=50, null=True, validators=[django.core.validators.MaxLengthValidator(50)])),
            ],
        ),
        migrations.CreateModel(
            name='Area',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='Main', max_length=50, validators=[django.core.validators.MaxLengthValidator(50)])),
            ],
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('slug', models.SlugField(unique=True, validators=[django.core.validators.RegexValidator(re.compile('^[-\\w]+\\Z'), "Enter a valid 'slug' consisting of Unicode letters, numbers, underscores, or hyphens.", 'invalid')])),
                ('name', models.CharField(max_length=50, validators=[django.core.validators.MaxLengthValidator(50)])),
                ('description', models.CharField(blank=True, max_length=200, null=True, validators=[django.core.validators.MaxLengthValidator(200)])),
                ('doors_open', models.DateTimeField(blank=True, null=True)),
                ('doors_close', models.DateTimeField(blank=True, null=True)),
                ('price', models.DecimalField(decimal_places=2, max_digits=5)),
                ('wardrobe', models.DecimalField(decimal_places=2, default=None, max_digits=4, null=True)),
                ('wardrobe_guarded', models.BooleanField(default=False)),
                ('dresscode', models.CharField(max_length=50, validators=[django.core.validators.MaxLengthValidator(50)])),
            ],
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, validators=[django.core.validators.MaxLengthValidator(50)])),
                ('venue_type', models.CharField(max_length=30, validators=[django.core.validators.MaxLengthValidator(30)])),
                ('street', models.CharField(max_length=50, validators=[django.core.validators.MaxLengthValidator(50)])),
                ('housenumber', models.CharField(max_length=10, validators=[django.core.validators.MaxLengthValidator(10)])),
                ('city', models.CharField(max_length=30, validators=[django.core.validators.MaxLengthValidator(30)])),
                ('areacode', models.CharField(blank=True, max_length=10, null=True, validators=[django.core.validators.MaxLengthValidator(10)])),
                ('free_parking', models.PositiveSmallIntegerField(default=False)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.AddConstraint(
            model_name='location',
            constraint=models.UniqueConstraint(fields=('street', 'housenumber'), name='unique location'),
        ),
        migrations.AddField(
            model_name='event',
            name='location',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='dancecalendar.Location'),
        ),
        migrations.AddField(
            model_name='activity',
            name='area',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dancecalendar.Area'),
        ),
        migrations.AddField(
            model_name='activity',
            name='event',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dancecalendar.Event'),
        ),
    ]
