# Generated by Django 2.0.5 on 2018-06-11 17:26

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Alternative',
            fields=[
                ('id', models.BigAutoField(primary_key=True, serialize=False)),
                ('description', models.CharField(max_length=100)),
            ],
            options={
                'db_table': 'alternative',
            },
        ),
        migrations.CreateModel(
            name='Criterion',
            fields=[
                ('id', models.BigAutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50)),
                ('range', models.PositiveIntegerField()),
                ('weight', models.PositiveIntegerField()),
                ('type', models.CharField(choices=[('QT', 'Quantitative'), ('QL', 'Qualitative')], max_length=50)),
                ('optimality_type', models.CharField(choices=[('max', 'Max'), ('min', 'Min')], db_column='optimalityType', max_length=12)),
                ('unit_of_measurement', models.CharField(db_column='unitOfMeasurement', max_length=20)),
            ],
            options={
                'db_table': 'criterion',
            },
        ),
        migrations.CreateModel(
            name='Lpr',
            fields=[
                ('id', models.BigAutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50)),
                ('range', models.IntegerField()),
            ],
            options={
                'db_table': 'lpr',
            },
        ),
        migrations.CreateModel(
            name='LprMark',
            fields=[
                ('id', models.BigAutoField(primary_key=True, serialize=False)),
                ('criterion', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='lab1.Criterion')),
                ('lpr', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='lab1.Lpr')),
            ],
            options={
                'db_table': 'lpr_mark',
            },
        ),
        migrations.CreateModel(
            name='Mark',
            fields=[
                ('id', models.BigAutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50)),
                ('range', models.FloatField()),
                ('num_equiv', models.DecimalField(decimal_places=2, max_digits=10)),
                ('norm_mark', models.DecimalField(decimal_places=2, max_digits=10)),
                ('crit', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='lab1.Criterion')),
            ],
            options={
                'db_table': 'mark',
            },
        ),
        migrations.CreateModel(
            name='Result',
            fields=[
                ('id', models.BigAutoField(editable=False, primary_key=True, serialize=False)),
                ('range', models.PositiveIntegerField(editable=False)),
                ('alt_weight', models.DecimalField(decimal_places=2, editable=False, max_digits=10)),
                ('alt', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.DO_NOTHING, to='lab1.Alternative')),
                ('lpr', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.DO_NOTHING, to='lab1.Lpr')),
            ],
            options={
                'db_table': 'result',
            },
        ),
        migrations.CreateModel(
            name='Vector',
            fields=[
                ('id', models.BigAutoField(primary_key=True, serialize=False)),
                ('alt', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='lab1.Alternative')),
                ('mark', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='lab1.Mark')),
            ],
            options={
                'db_table': 'vector',
            },
        ),
    ]
