# Generated by Django 2.2.10 on 2020-04-28 15:53

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='EvaluationCommittee',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('is_evaluation_closed', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Team',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('project_description', models.TextField()),
                ('project', models.CharField(max_length=100)),
                ('total_score', models.FloatField(default=0)),
                ('evaluation_committee', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='online.EvaluationCommittee')),
            ],
        ),
        migrations.CreateModel(
            name='TeamMember',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('surname', models.CharField(max_length=100)),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('team', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='online.Team')),
            ],
            options={
                'verbose_name': 'team member',
                'verbose_name_plural': 'team members',
                'ordering': ['email'],
            },
        ),
        migrations.CreateModel(
            name='Evaluator',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('evaluation_committee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='online.EvaluationCommittee')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Evaluation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('comment', models.TextField(blank=True, null=True)),
                ('total_score', models.FloatField(default=0)),
                ('team', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='online.Team')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='online.Evaluator')),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField()),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('team', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='online.Team')),
            ],
        ),
        migrations.CreateModel(
            name='CategoryScore',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('percentage', models.FloatField()),
                ('is_committee_score', models.BooleanField(default=False)),
                ('score', models.FloatField(default=0)),
                ('evaluation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='online.Evaluation')),
            ],
        ),
    ]
