# Generated by Django 3.0.5 on 2020-05-09 15:53

import datetime
from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

    dependencies = [
        ('app', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Interview',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('interviewer_token', models.UUIDField(default=uuid.uuid4, editable=False)),
                ('interviewee_token', models.UUIDField(default=uuid.uuid4, editable=False)),
                ('password', models.CharField(max_length=32)),
                ('start_time', models.DateTimeField()),
                ('length', models.PositiveIntegerField(default=30)),
            ],
        ),
        migrations.CreateModel(
            name='Interviewee',
            fields=[
                ('email', models.EmailField(max_length=254, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=64)),
                ('application_result', models.IntegerField(choices=[(0, 'Pending'), (1, 'Approved'), (2, 'Rejected')], default=0)),
            ],
        ),
        migrations.CreateModel(
            name='Interviewer',
            fields=[
                ('id', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='app.User')),
                ('free_time', models.TextField()),
            ],
        ),
        migrations.AlterField(
            model_name='user',
            name='email',
            field=models.EmailField(max_length=254, unique=True),
        ),
        migrations.CreateModel(
            name='InterviewComment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rate', models.IntegerField(choices=[(0, 'S'), (1, 'A'), (2, 'B'), (3, 'C'), (4, 'D')])),
                ('comment', models.TextField()),
                ('interview', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='comment', to='app.Interview')),
            ],
        ),
        migrations.AddField(
            model_name='interview',
            name='hr',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='app.User'),
        ),
        migrations.AddField(
            model_name='interview',
            name='interviewee',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='app.Interviewee'),
        ),
        migrations.AddField(
            model_name='interview',
            name='interviewer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='app.Interviewer'),
        ),
        migrations.CreateModel(
            name='HRAssignInterviewer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('hr', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='app.User')),
                ('interviewer', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='app.Interviewer')),
            ],
        ),
        migrations.CreateModel(
            name='HRAssignInterviewee',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('hr', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='app.User')),
                ('interviewee', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='app.Interviewee')),
            ],
        ),
        migrations.CreateModel(
            name='History',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(choices=[('chat', 'chat'), ('whiteboard', 'whiteboard'), ('code', 'code')], max_length=12)),
                ('time', models.DateTimeField(default=datetime.datetime.utcnow)),
                ('data', models.TextField()),
                ('interview', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='app.Interview')),
            ],
        ),
    ]
