# Generated by Django 3.0.6 on 2020-05-24 06:50

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='ApplicationArea',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Название')),
            ],
            options={
                'verbose_name': 'Область применения',
                'verbose_name_plural': 'Области применения',
            },
        ),
        migrations.CreateModel(
            name='Instrument',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Название')),
                ('image', models.ImageField(upload_to='', verbose_name='Изображение')),
                ('description', models.TextField(max_length=2000, verbose_name='Описание')),
                ('file1', models.FileField(upload_to='', verbose_name='Файл 1')),
                ('file2', models.FileField(upload_to='', verbose_name='Файл 2')),
                ('application_area', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='machinetools.ApplicationArea', verbose_name='Область применения')),
            ],
            options={
                'verbose_name': 'Инструмент',
                'verbose_name_plural': 'Инструменты',
            },
        ),
        migrations.CreateModel(
            name='Manual',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, unique=True, verbose_name='Название')),
                ('file', models.FileField(upload_to='', verbose_name='Файл')),
            ],
            options={
                'verbose_name': 'Справочник',
                'verbose_name_plural': 'Справочники',
            },
        ),
        migrations.CreateModel(
            name='ProcessingType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Название')),
            ],
            options={
                'verbose_name': 'Вид обработки',
                'verbose_name_plural': 'Виды обработок',
            },
        ),
        migrations.CreateModel(
            name='Stanok',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Название')),
                ('power', models.FloatField(verbose_name='Мощность, кВт')),
                ('rotation_frequency', models.FloatField(verbose_name='Частота вращения, Об/мин')),
                ('spindle_cone', models.CharField(max_length=50, verbose_name='Конус шпинделя')),
                ('torque', models.FloatField(verbose_name='Крутящий момент, Н*м')),
                ('description', models.TextField(max_length=2000, verbose_name='Описание')),
            ],
            options={
                'verbose_name': 'Станок',
                'verbose_name_plural': 'Станки',
            },
        ),
        migrations.CreateModel(
            name='StanokGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, unique=True, verbose_name='Название')),
            ],
            options={
                'verbose_name': 'Группа станков',
                'verbose_name_plural': 'Группы станков',
            },
        ),
        migrations.CreateModel(
            name='WorkpieceType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Название')),
            ],
            options={
                'verbose_name': 'Вид обрабатываемой детали',
                'verbose_name_plural': 'Виды обрабатываемой детали',
            },
        ),
        migrations.CreateModel(
            name='StanokImage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(upload_to='', verbose_name='Изображение')),
                ('stanok', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='images', to='machinetools.Stanok')),
            ],
        ),
        migrations.AddField(
            model_name='stanok',
            name='group',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='machinetools.StanokGroup', verbose_name='Группа станков'),
        ),
        migrations.CreateModel(
            name='InstrumentImage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(upload_to='', verbose_name='Изображение')),
                ('instrument', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='images', to='machinetools.Instrument')),
            ],
        ),
        migrations.AddField(
            model_name='instrument',
            name='processing_type',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='machinetools.ProcessingType', verbose_name='Вид обработки'),
        ),
        migrations.AddField(
            model_name='instrument',
            name='workpiece_type',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='machinetools.WorkpieceType', verbose_name='Вид обрабатываемой детали'),
        ),
    ]
