# Generated by Django 2.2.3 on 2019-11-26 11:24

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='Application',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(choices=[('N', 'Received'), ('A', 'Accepted'), ('R', 'Rejected')], default='N', max_length=1)),
            ],
        ),
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=256)),
            ],
        ),
        migrations.CreateModel(
            name='Lab',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=256)),
                ('description', models.CharField(max_length=256)),
                ('capacity', models.IntegerField()),
                ('active', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='Offer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('o_type', models.CharField(choices=[('I', 'Internship'), ('F', 'Full Time'), ('IF', 'Internship with Full Time')], max_length=2)),
                ('cgpa_cut', models.DecimalField(decimal_places=2, max_digits=4)),
                ('job_location', models.CharField(max_length=256)),
                ('active', models.BooleanField(default=True)),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='placement.Company')),
            ],
        ),
        migrations.CreateModel(
            name='SeatingPlan',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('applicantion', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='placement.Application')),
                ('lab', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='placement.Lab')),
                ('offer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='placement.Offer')),
            ],
        ),
        migrations.AddField(
            model_name='application',
            name='offer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='placement.Offer'),
        ),
        migrations.AddField(
            model_name='application',
            name='student',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
