# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-13 21:04
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('shop', '0014_auto_20170212_1539'),
    ]

    operations = [
        migrations.CreateModel(
            name='Stocktake',
            fields=[
                ('date_created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='date created')),
                ('date_modified', models.DateTimeField(auto_now=True, null=True, verbose_name='date modified')),
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('locked', models.BooleanField(default=False)),
            ],
            options={
                'verbose_name': 'Stock-take',
                'verbose_name_plural': 'Stock-takes',
            },
        ),
        migrations.CreateModel(
            name='StocktakeChunk',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('locked', models.BooleanField(default=False)),
                ('owner', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('stocktake', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='chunks', to='shop.Stocktake')),
            ],
            options={
                'verbose_name': 'Chunk',
                'verbose_name_plural': 'Chunks',
            },
        ),
        migrations.CreateModel(
            name='StocktakeItem',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('qty', models.PositiveIntegerField(default=0)),
                ('chunk', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='items', to='shop.StocktakeChunk')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='stocktake_item', to='shop.Product')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AlterField(
            model_name='supplierproduct',
            name='qty_multiplier',
            field=models.PositiveIntegerField(default=1, help_text='The quantity in the report will be multiplied by this value.', verbose_name='Quantity multiplier'),
        ),
    ]
