# Generated by Django 3.0.8 on 2020-08-23 18:04

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('starttime', models.DateTimeField(blank=True)),
                ('max_volunteer', models.PositiveIntegerField(default=0)),
                ('approval_needed', models.BooleanField(default=False)),
                ('max_commitments', models.PositiveIntegerField(default=0)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='EventItem',
            fields=[
                ('eventitem_id', models.AutoField(primary_key=True, serialize=False)),
                ('visible', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='Resource',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='ResourceItem',
            fields=[
                ('resourceitem_id', models.AutoField(primary_key=True, serialize=False)),
            ],
        ),
        migrations.CreateModel(
            name='LocationItem',
            fields=[
                ('resourceitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='scheduler.ResourceItem')),
            ],
            bases=('scheduler.resourceitem',),
        ),
        migrations.CreateModel(
            name='WorkerItem',
            fields=[
                ('resourceitem_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='scheduler.ResourceItem')),
            ],
            bases=('scheduler.resourceitem',),
        ),
        migrations.CreateModel(
            name='ResourceAllocation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='resources_allocated', to='scheduler.Event')),
                ('resource', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='allocations', to='scheduler.Resource')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Ordering',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order', models.IntegerField(default=0)),
                ('role', models.CharField(blank=True, max_length=50)),
                ('class_name', models.CharField(blank=True, max_length=50)),
                ('class_id', models.IntegerField(blank=True, null=True)),
                ('allocation', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='scheduler.ResourceAllocation')),
            ],
        ),
        migrations.CreateModel(
            name='Label',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField(default='')),
                ('allocation', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='scheduler.ResourceAllocation')),
            ],
        ),
        migrations.CreateModel(
            name='EventEvalQuestion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('question', models.CharField(max_length=200)),
                ('visible', models.BooleanField(default=True)),
                ('help_text', models.TextField(blank=True, max_length=500)),
                ('order', models.IntegerField()),
                ('answer_type', models.CharField(choices=[('grade', 'grade'), ('text', 'text'), ('boolean', 'boolean')], max_length=20)),
            ],
            options={
                'ordering': ['order'],
                'unique_together': {('order',), ('question',)},
            },
        ),
        migrations.CreateModel(
            name='EventContainer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('child_event', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='container_event', to='scheduler.Event')),
                ('parent_event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='contained_events', to='scheduler.Event')),
            ],
        ),
        migrations.AddField(
            model_name='event',
            name='eventitem',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='scheduler_events', to='scheduler.EventItem'),
        ),
        migrations.CreateModel(
            name='Worker',
            fields=[
                ('resource_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='scheduler.Resource')),
                ('role', models.CharField(blank=True, choices=[('Interested', 'Interested'), ('Moderator', 'Moderator'), ('Panelist', 'Panelist'), ('Performer', 'Performer'), ('Producer', 'Producer'), ('Staff Lead', 'Staff Lead'), ('Teacher', 'Teacher'), ('Technical Director', 'Technical Director'), ('Volunteer', 'Volunteer'), ('Rejected', 'Rejected'), ('Waitlisted', 'Waitlisted'), ('Pending Volunteer', 'Pending Volunteer')], max_length=50)),
                ('_item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='scheduler.WorkerItem')),
            ],
            bases=('scheduler.resource',),
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('resource_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='scheduler.Resource')),
                ('_item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='scheduler.LocationItem')),
            ],
            bases=('scheduler.resource',),
        ),
        migrations.CreateModel(
            name='EventLabel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.CharField(default='', max_length=200)),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='scheduler.Event')),
            ],
            options={
                'unique_together': {('text', 'event')},
            },
        ),
        migrations.CreateModel(
            name='EventEvalGrade',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('answer', models.IntegerField(blank=True, choices=[(4, 'A'), (3, 'B'), (2, 'C'), (1, 'D'), (0, 'F'), (None, 'NA')], null=True, validators=[django.core.validators.MinValueValidator(-1), django.core.validators.MaxValueValidator(5)])),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='scheduler.Event')),
                ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='scheduler.EventEvalQuestion')),
                ('profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='scheduler.WorkerItem')),
            ],
            options={
                'abstract': False,
                'unique_together': {('profile', 'event', 'question')},
            },
        ),
        migrations.CreateModel(
            name='EventEvalComment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('answer', models.TextField(blank=True, max_length=500)),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='scheduler.Event')),
                ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='scheduler.EventEvalQuestion')),
                ('profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='scheduler.WorkerItem')),
            ],
            options={
                'abstract': False,
                'unique_together': {('profile', 'event', 'question')},
            },
        ),
        migrations.CreateModel(
            name='EventEvalBoolean',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('answer', models.BooleanField()),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='scheduler.Event')),
                ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='scheduler.EventEvalQuestion')),
                ('profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='scheduler.WorkerItem')),
            ],
            options={
                'abstract': False,
                'unique_together': {('profile', 'event', 'question')},
            },
        ),
    ]
