# -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-03-23 17:47
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='Department',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('department_id', models.CharField(max_length=1000)),
                ('department_name', models.CharField(max_length=1000)),
                ('password', models.CharField(max_length=1000)),
            ],
        ),
        migrations.CreateModel(
            name='Question',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.CharField(max_length=5000)),
                ('subject', models.CharField(max_length=5000)),
                ('type', models.CharField(max_length=50)),
                ('timestamp', models.DateTimeField(auto_now=True, null=True)),
                ('deadline', models.DateTimeField()),
                ('asked_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='QuestionFor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('answer', models.TextField()),
                ('asked_to', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='portal.Department')),
                ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='portal.Question')),
            ],
        ),
        migrations.CreateModel(
            name='Recommendation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('recommended_answer', models.TextField()),
                ('by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='by', to='portal.Department')),
                ('to', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='to', to='portal.Department')),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='recommendation',
            unique_together=set([('to', 'by')]),
        ),
    ]
