# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-11-07 10:36
from __future__ import unicode_literals

import datetime
from django.db import migrations, models
import django.db.models.deletion
from django.utils.timezone import utc


class Migration(migrations.Migration):

    dependencies = [
        ('store', '0061_auto_20161107_1628'),
    ]

    operations = [
        migrations.CreateModel(
            name='ChainStoreItemInventory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('purchase_price', models.FloatField(verbose_name='\u8fdb\u8d27\u4ef7\u683c')),
                ('quantity', models.FloatField(verbose_name='\u5e93\u5b58')),
                ('tax', models.FloatField(null=True, verbose_name='\u7a0e\u989d ')),
                ('fill_date', models.DateField(verbose_name='\u751f\u6210\u65e5\u671f')),
                ('chain_store', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='store.ChainStore', verbose_name='\u8fde\u9501\u5e97')),
                ('store_item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='store.StoreItem', verbose_name='\u5546\u5e97\u5546\u54c1')),
            ],
            options={
                'verbose_name': '\u8fde\u9501\u5e97\u5927\u4ed3\u5e93\u5b58',
                'verbose_name_plural': '\u8fde\u9501\u5e97\u5927\u4ed3\u5e93\u5b58',
            },
        ),
        migrations.AlterModelOptions(
            name='storeiteminventory',
            options={'verbose_name': 'StoreItemInventory', 'verbose_name_plural': 'StoreItemInventories'},
        ),
        migrations.RenameField(
            model_name='storeiteminventory',
            old_name='inventory',
            new_name='quantity',
        ),
        migrations.AddField(
            model_name='storeiteminventory',
            name='fill_date',
            field=models.DateField(default=datetime.datetime(2016, 11, 7, 10, 36, 38, 974832, tzinfo=utc), verbose_name='\u751f\u6210\u65e5\u671f'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='storeiteminventory',
            name='store',
            field=models.ForeignKey(default=30, on_delete=django.db.models.deletion.CASCADE, related_name='inventory', to='store.Store', verbose_name='\u5546\u5e97'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='storeiteminventory',
            name='tax',
            field=models.FloatField(null=True, verbose_name='\u7a0e\u989d '),
        ),
        migrations.AlterField(
            model_name='storeiteminventory',
            name='store_item',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='inventory', to='store.StoreItem', verbose_name='\u5546\u5e97\u5546\u54c1'),
        ),
        migrations.AlterUniqueTogether(
            name='storeiteminventory',
            unique_together=set([('fill_date', 'store', 'store_item')]),
        ),
        migrations.AlterUniqueTogether(
            name='chainstoreiteminventory',
            unique_together=set([('fill_date', 'store_item', 'chain_store')]),
        ),
    ]
