# Generated by Django 3.2.6 on 2021-08-18 19:50

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='UnitGroup',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=512, verbose_name='Название')),
            ],
            options={
                'verbose_name': 'Группа единиц измерения',
                'verbose_name_plural': 'Группы единиц измерения',
                'db_table': 'product_unit_group',
            },
            bases=(utils.classes.ProjectClass, models.Model),
        ),
        migrations.CreateModel(
            name='Unit',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=256, verbose_name='Название')),
                ('abbreviation', models.CharField(max_length=16, verbose_name='Аббревиатура')),
                ('unit_group', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='products.unitgroup')),
            ],
            options={
                'verbose_name': 'Единица измерения',
                'verbose_name_plural': 'Единицы измерения',
                'db_table': 'products_unit',
            },
            bases=(utils.classes.ProjectClass, models.Model),
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=512, verbose_name='Название')),
                ('description', models.TextField(max_length=2048, verbose_name='Описание')),
                ('unit_group', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='products.unitgroup')),
            ],
            options={
                'verbose_name': 'Продукт',
                'verbose_name_plural': 'Продукты',
                'db_table': 'products_product',
            },
            bases=(utils.classes.ProjectClass, models.Model),
        ),
    ]
