# Generated by Django 3.0 on 2019-12-20 06:34

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Decoration',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('articul', models.CharField(default=0, max_length=20, unique=True, verbose_name='Артикул')),
                ('name', models.CharField(default='Введите наименование украшения', max_length=30, verbose_name='Наименование')),
                ('measure_unit', models.CharField(default='Введите единицу измерения', max_length=30, verbose_name='Единицы измерения')),
                ('amount', models.FloatField(default=0, verbose_name='Количество')),
                ('image', models.ImageField(blank=True, upload_to='', verbose_name='Изображение')),
                ('decoration_type', models.CharField(default='Введите тип украшения', max_length=30, verbose_name='Тип украшения')),
                ('purchase_price', models.FloatField(default=0, verbose_name='Закупочная цена')),
                ('weight', models.FloatField(default=0, verbose_name='Вес единицы украшения')),
            ],
        ),
        migrations.CreateModel(
            name='EquipmentType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('equipment_type', models.CharField(default=1, max_length=200, verbose_name='Маркировка')),
            ],
        ),
        migrations.CreateModel(
            name='Ingredient',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('articul', models.CharField(default=0, max_length=20, unique=True, verbose_name='Артикул')),
                ('name', models.CharField(default='Введите наименование ингредиента', max_length=30, verbose_name='Наименование')),
                ('measure_unit', models.CharField(default='Введите единицу измерения', max_length=30, verbose_name='Единицы измерения')),
                ('amount', models.FloatField(default=0, verbose_name='Количество')),
                ('image', models.ImageField(blank=True, upload_to='', verbose_name='Изображение')),
                ('ingredient_type', models.CharField(default='Введите тип ингредиента', max_length=30, verbose_name='Тип Ингредиента')),
                ('purchase_price', models.FloatField(default=0, verbose_name='Закупочная цена')),
                ('gost', models.CharField(blank=True, max_length=10, verbose_name='ГОСТ')),
                ('packing', models.CharField(blank=True, max_length=20, verbose_name='Фасовка')),
                ('characteristic', models.TextField(blank=True, verbose_name='Характеристика')),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='Наименование', max_length=100, verbose_name='Наименование изделия')),
                ('sizes', models.CharField(default='Размеры', max_length=100, verbose_name='Размеры изделия')),
            ],
        ),
        migrations.CreateModel(
            name='Provider',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='Поставщик', max_length=100, verbose_name='Наименование')),
                ('address', models.CharField(blank=True, max_length=100, null=True, verbose_name='Адрес')),
                ('delivery_period', models.DateField(default=django.utils.timezone.now, verbose_name='Срок доставки')),
            ],
        ),
        migrations.CreateModel(
            name='Tool',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='Введите наименование инструмента', max_length=50, verbose_name='Наименование')),
                ('description', models.TextField(blank=True, verbose_name='Описание')),
                ('tool_type', models.CharField(default='Введите тип инструмента', max_length=50, verbose_name='Тип инструмента')),
                ('wear_degree', models.CharField(default='Введите степень износа', max_length=50, verbose_name='Степень износа')),
                ('purchase_date', models.DateTimeField(verbose_name='Дата приобретения')),
                ('amount', models.FloatField(default=0, verbose_name='Количество')),
            ],
        ),
        migrations.CreateModel(
            name='SemifinishedSpecification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.FloatField(blank=True, default=0, verbose_name='Количество')),
                ('product', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='product', to='csharp.Product', verbose_name='Изделие')),
                ('semifinished', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='semifinished', to='csharp.Product', verbose_name='Полуфабрикат')),
            ],
        ),
        migrations.CreateModel(
            name='ProductSpecification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.FloatField(blank=True, default=0, verbose_name='Количество')),
                ('ingredient', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='csharp.Ingredient', verbose_name='Ингредиент')),
                ('product', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='csharp.Product', verbose_name='Изделие')),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_added', models.DateTimeField(auto_now_add=True, verbose_name='Дата заказа')),
                ('order_name', models.CharField(max_length=200, verbose_name='Наименование заказа')),
                ('status', models.CharField(choices=[('Новый', 'Новый'), ('Отменён', 'Отменён'), ('Составление спецификации', 'Составление спецификации'), ('Подтверждение', 'Подтверждение'), ('Закупка', 'Закупка'), ('Контроль', 'Контроль'), ('Готов', 'Готов'), ('Выполнен', 'Выполнен')], default='Новый', max_length=200, verbose_name='Статус заказа')),
                ('cost', models.FloatField(blank=True, verbose_name='Стоимость')),
                ('completion_date', models.DateTimeField(blank=True, verbose_name='Плановая дата завершения')),
                ('work_examples', models.CharField(blank=True, max_length=200, verbose_name='Примеры работ')),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='customer', to=settings.AUTH_USER_MODEL, verbose_name='Заказчик')),
                ('manager', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='manager', to=settings.AUTH_USER_MODEL, verbose_name='Ответственный менеджер')),
                ('product', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='csharp.Product', verbose_name='Изделие')),
            ],
        ),
        migrations.CreateModel(
            name='OperationSpecification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('num', models.IntegerField(default=1, verbose_name='Порядковый номер')),
                ('operation', models.CharField(default='Введите операцию', max_length=200, verbose_name='Операция')),
                ('operation_time', models.DateTimeField(blank=True, default=django.utils.timezone.now, verbose_name='Время на операцию')),
                ('equipment_type', models.ForeignKey(blank=True, default=1, on_delete=django.db.models.deletion.CASCADE, to='csharp.EquipmentType', verbose_name='Тип оборудования')),
                ('product', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='csharp.Product', verbose_name='Изделие')),
            ],
        ),
        migrations.AddField(
            model_name='ingredient',
            name='provider',
            field=models.ForeignKey(blank=True, default=1, on_delete=django.db.models.deletion.CASCADE, to='csharp.Provider', verbose_name='Поставщик'),
        ),
        migrations.CreateModel(
            name='Equipment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('marking', models.CharField(default='Введите маркировку', max_length=200, verbose_name='Маркировка')),
                ('characteristic', models.TextField(blank=True, verbose_name='Характеристика')),
                ('equipment_type', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='csharp.EquipmentType', verbose_name='Тип оборудования')),
            ],
        ),
        migrations.CreateModel(
            name='DecorationSpecification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.FloatField(blank=True, default=0, verbose_name='Количество')),
                ('decoration', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='csharp.Decoration', verbose_name='Украшение для торта')),
                ('product', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='csharp.Product', verbose_name='Изделие')),
            ],
        ),
        migrations.AddField(
            model_name='decoration',
            name='provider',
            field=models.ForeignKey(blank=True, default=1, on_delete=django.db.models.deletion.CASCADE, to='csharp.Provider', verbose_name='Поставщик'),
        ),
    ]
