# Generated by Django 5.1.4 on 2025-01-07 14:56 import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Product', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=255, verbose_name='Наименование товара')), ('manufacturer_name', models.CharField(max_length=255, verbose_name='Производитель')), ('manufacturer_country', models.CharField(max_length=255, verbose_name='Страна производителя')), ('manufacturer_code', models.CharField(blank=True, max_length=50, null=True, verbose_name='Код производителя')), ('dimensions', models.CharField(blank=True, max_length=255, null=True, verbose_name='Размеры')), ('unit_of_measure', models.CharField(max_length=50, verbose_name='Единица измерения')), ('shelf_life_days', models.IntegerField(verbose_name='Срок годности (дни)')), ('barcode', models.CharField(max_length=50, unique=True, verbose_name='Штрихкод')), ], ), migrations.CreateModel( name='StorageLocation', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=255, verbose_name='Наименование')), ('type', models.CharField(choices=[('Store', 'Магазин'), ('Distribution Center', 'Распределительный центр'), ('Office', 'Офис')], max_length=50, verbose_name='Тип места хранения')), ], ), migrations.CreateModel( name='PriceList', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('price_type', models.CharField(choices=[('Regular', 'Регулярная'), ('Discount', 'Скидочная'), ('Promotional', 'Акционная')], max_length=50, verbose_name='Тип цены')), ('entry_price', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='Входная цена')), ('final_price', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='Итоговая цена')), ('date_effective', models.DateField(verbose_name='Дата вступления в силу')), ('constraint_percent_limit', models.DecimalField(decimal_places=2, default=1000, max_digits=5, verbose_name='Лимит на наценку (%)')), ('constraint_price_change', models.DecimalField(decimal_places=2, default=90, max_digits=5, verbose_name='Лимит на изменение цены (%)')), ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventory.product', verbose_name='Товар')), ], ), migrations.CreateModel( name='StockOperation', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('operation_type', models.CharField(choices=[('Incoming', 'Приход'), ('Outgoing', 'Расход'), ('Transfer', 'Перемещение')], max_length=50, verbose_name='Тип операции')), ('quantity', models.IntegerField(verbose_name='Количество')), ('operation_date', models.DateTimeField(auto_now_add=True, verbose_name='Дата операции')), ('expiration_date', models.DateField(blank=True, null=True, verbose_name='Срок годности')), ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventory.product', verbose_name='Товар')), ('location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventory.storagelocation', verbose_name='Место хранения')), ], ), migrations.CreateModel( name='Inventory', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('quantity', models.IntegerField(verbose_name='Количество')), ('inventory_date', models.DateField(verbose_name='Дата инвентаризации')), ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventory.product', verbose_name='Товар')), ('location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventory.storagelocation', verbose_name='Место хранения')), ], ), ]