# Generated by Django 2.2.3 on 2019-07-21 01:32

from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Inventory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('is_active', models.BooleanField(default=True, verbose_name='aktywny')),
                ('net_prices', models.BooleanField(default=False, verbose_name='w cenach netto')),
                ('created_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'lista remanentów',
                'verbose_name_plural': 'lista remanentów',
            },
        ),
        migrations.CreateModel(
            name='MakeGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=70, verbose_name='nazwa grupy towarowej')),
            ],
            options={
                'verbose_name': 'grupa towarowa',
                'verbose_name_plural': 'grupy towarowe',
            },
        ),
        migrations.CreateModel(
            name='Shop',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('address', models.TextField(verbose_name='sklep')),
            ],
            options={
                'verbose_name': 'adres sklepu',
                'verbose_name_plural': 'adresy sklepów',
            },
        ),
        migrations.CreateModel(
            name='Unit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=10)),
            ],
            options={
                'verbose_name': 'jednostka miary',
                'verbose_name_plural': 'jednostki miar',
            },
        ),
        migrations.CreateModel(
            name='Make',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=70, verbose_name='nazwa towaru')),
                ('name_print', models.CharField(max_length=70, null=True, verbose_name='nazwa do druku')),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventory.MakeGroup', verbose_name='grupa towarowa')),
            ],
            options={
                'verbose_name': 'nazwa towaru',
                'verbose_name_plural': 'nazwy towarów',
            },
        ),
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('price', models.FloatField(validators=[django.core.validators.MinValueValidator(0.1), django.core.validators.MaxValueValidator(11000)], verbose_name='cena brutto')),
                ('quantity', models.FloatField(validators=[django.core.validators.MinValueValidator(0.01), django.core.validators.MaxValueValidator(100)], verbose_name='ilość')),
                ('net_price', models.FloatField(default=0, validators=[django.core.validators.MinValueValidator(0.1), django.core.validators.MaxValueValidator(11000)], verbose_name='cena netto')),
                ('created_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
                ('inventory', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='inventory.Inventory', verbose_name='remanent')),
                ('make', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventory.Make', verbose_name='nazwa towaru')),
                ('unit', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventory.Unit', verbose_name='j.m.')),
            ],
            options={
                'verbose_name': 'remanent',
                'verbose_name_plural': 'remanenty',
            },
        ),
        migrations.AddField(
            model_name='inventory',
            name='shop',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventory.Shop', verbose_name='sklep'),
        ),
    ]
