# Generated by Django 2.0 on 2019-05-28 11:13

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('warehouse', '0006_auto_20190528_1656'),
    ]

    operations = [
        migrations.CreateModel(
            name='PurchaseListApply',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('good_name', models.CharField(max_length=100, verbose_name='品名')),
                ('good_version', models.CharField(max_length=100, verbose_name='型号')),
                ('good_num', models.IntegerField(default=0, verbose_name='数量')),
                ('apply_date', models.DateField(auto_now_add=True, verbose_name='申请日期')),
            ],
        ),
        migrations.RemoveField(
            model_name='purchaselist',
            name='apply_date',
        ),
        migrations.RemoveField(
            model_name='purchaselist',
            name='apply_staff_name',
        ),
        migrations.RemoveField(
            model_name='purchaselist',
            name='id',
        ),
        migrations.RemoveField(
            model_name='purchaselist',
            name='sanction_date',
        ),
        migrations.RemoveField(
            model_name='purchaselist',
            name='sanction_staff_name',
        ),
        migrations.CreateModel(
            name='PurchaseListSanction',
            fields=[
                ('PurchaseList_sanction_id', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='warehouse.PurchaseListApply')),
                ('good_name', models.CharField(max_length=100, verbose_name='品名')),
                ('good_version', models.CharField(max_length=100, verbose_name='型号')),
                ('good_num', models.IntegerField(default=0, verbose_name='数量')),
                ('sanction_staff_name', models.CharField(max_length=100, verbose_name='批准人')),
                ('sanction_date', models.DateField(auto_now=True, verbose_name='批准日期')),
                ('price', models.BigIntegerField(default=0, verbose_name='单价')),
                ('total_price', models.BigIntegerField(default=0, verbose_name='总价')),
            ],
        ),
        migrations.AddField(
            model_name='purchaselistapply',
            name='apply_staff_name',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='申请人'),
        ),
        migrations.AddField(
            model_name='purchaselist',
            name='PurchaseList_id',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='warehouse.PurchaseListSanction'),
        ),
    ]
