# Generated by Django 2.2 on 2019-04-26 10:01

from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import isc_common.fields.code_field
import isc_common.fields.description_field
import isc_common.fields.name_field
import isc_common.fields.related


class Migration(migrations.Migration):

    dependencies = [
        ('ckk', '0040_item_line_view'),
        ('production', '0011_temp_production_operationsplan'),
    ]

    operations = [
        migrations.CreateModel(
            name='Operation_plan_status',
            fields=[
                ('id', models.BigAutoField(primary_key=True, serialize=False, verbose_name='Идентификатор')),
                ('id_old', models.BigIntegerField(blank=True, null=True, verbose_name='Идентификатор старый')),
                ('deleted_at', models.DateTimeField(blank=True, db_index=True, null=True, verbose_name='Дата мягкого удаления')),
                ('editing', models.BooleanField(default=True, verbose_name='Возможность редактирования')),
                ('deliting', models.BooleanField(default=True, verbose_name='Возможность удаления')),
                ('lastmodified', models.DateTimeField(db_index=True, default=django.utils.timezone.now, editable=False, verbose_name='Последнее обновление')),
                ('code', isc_common.fields.code_field.CodeField()),
                ('name', isc_common.fields.name_field.NameField()),
                ('description', isc_common.fields.description_field.DescriptionField()),
            ],
            options={
                'verbose_name': 'Статусы',
            },
        ),
        migrations.AddField(
            model_name='operationsplan',
            name='item',
            field=isc_common.fields.related.ForeignKeyProtect(default=None, on_delete=django.db.models.deletion.PROTECT, to='ckk.Item'),
        ),
        migrations.AddField(
            model_name='operationsplan',
            name='location',
            field=isc_common.fields.related.ForeignKeyProtect(default=None, on_delete=django.db.models.deletion.PROTECT, to='ckk.Locations'),
        ),
        migrations.AddField(
            model_name='operationsplan',
            name='startdate',
            field=models.DateTimeField(db_index=True, default=None),
        ),
        migrations.AddField(
            model_name='operationsplan',
            name='type',
            field=isc_common.fields.related.ForeignKeyProtect(default=None, on_delete=django.db.models.deletion.PROTECT, to='production.Operation_plan_types'),
        ),
        migrations.AddField(
            model_name='operationsplan',
            name='status',
            field=isc_common.fields.related.ForeignKeyProtect(default=None, on_delete=django.db.models.deletion.PROTECT, to='production.Operation_plan_status'),
        ),
    ]
