# Generated by Django 2.0.2 on 2018-06-03 13:52

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Job',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('arrival_date', models.IntegerField()),
                ('duration', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Machine',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='OptimizationJob',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('found_all_feasible', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='SolutionComponents',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('start_date', models.IntegerField()),
                ('end_date', models.IntegerField()),
                ('job', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='plastics.Job')),
                ('machine', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='plastics.Machine')),
            ],
        ),
        migrations.CreateModel(
            name='SolutionSet',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('optimization_job', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='plastics.OptimizationJob')),
            ],
        ),
        migrations.AddField(
            model_name='solutioncomponents',
            name='solution',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='plastics.SolutionSet'),
        ),
        migrations.AddField(
            model_name='job',
            name='machines',
            field=models.ManyToManyField(to='plastics.Machine'),
        ),
        migrations.AddField(
            model_name='job',
            name='optimization_job',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='plastics.OptimizationJob'),
        ),
    ]
