# Generated by Django 2.0 on 2019-01-04 01:25

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('company', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='WuZiChuKu',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ckdh', models.CharField(max_length=50, unique=True, verbose_name='出库单号')),
                ('cj', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, null=True, verbose_name='价格')),
                ('sl', models.IntegerField(default=0, verbose_name='数量')),
                ('je', models.DecimalField(blank=True, decimal_places=2, editable=False, max_digits=20, null=True, verbose_name='金额')),
                ('czsj', models.DateTimeField(default=django.utils.timezone.now, verbose_name='操作时间')),
                ('date', models.DateField(blank=True, editable=False, verbose_name='日期')),
                ('czz', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.Employee', to_field='name', verbose_name='操作者')),
            ],
            options={
                'verbose_name_plural': '物资出库',
                'verbose_name': '物资出库',
            },
        ),
        migrations.CreateModel(
            name='WuZiFaFang',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ffbh', models.CharField(max_length=20, unique=True, verbose_name='发放编号')),
                ('cj', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, null=True, verbose_name='价格')),
                ('sl', models.IntegerField(default=0, verbose_name='数量')),
                ('je', models.DecimalField(blank=True, decimal_places=2, editable=False, max_digits=20, null=True, verbose_name='金额')),
                ('czsj', models.DateTimeField(default=django.utils.timezone.now, verbose_name='操作时间')),
                ('date', models.DateField(blank=True, editable=False, verbose_name='日期')),
                ('czz', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.Employee', to_field='name', verbose_name='操作者')),
                ('nh', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.NongHuXinXi', verbose_name='农户')),
            ],
            options={
                'verbose_name_plural': '物资发放',
                'verbose_name': '物资发放',
            },
        ),
        migrations.CreateModel(
            name='WuZiKuCun',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('wzkcbh', models.CharField(max_length=50, unique=True, verbose_name='物资库存编号')),
                ('wzmc', models.CharField(default='', max_length=50, verbose_name='物资名称')),
                ('ssjg', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.JiGou', verbose_name='所属机构')),
                ('wzbh', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.WuZiXinXi', verbose_name='物资编号')),
            ],
            options={
                'verbose_name_plural': '物资库存',
                'verbose_name': '物资库存',
            },
        ),
        migrations.CreateModel(
            name='WuZiPanCun',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sl', models.IntegerField(default=0, verbose_name='数量')),
                ('czsj', models.DateTimeField(default=django.utils.timezone.now, verbose_name='操作时间')),
                ('date', models.DateField(blank=True, editable=False, verbose_name='日期')),
                ('czz', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.Employee', to_field='name', verbose_name='操作者')),
                ('wzkc', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventory.WuZiKuCun', verbose_name='物资库存表')),
            ],
            options={
                'verbose_name_plural': '物资盘存',
                'verbose_name': '物资盘存',
            },
        ),
        migrations.CreateModel(
            name='WuZiRuKu',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rkdh', models.CharField(max_length=50, unique=True, verbose_name='入库单号')),
                ('cj', models.DecimalField(blank=True, decimal_places=2, default=0, max_digits=10, null=True, verbose_name='价格')),
                ('sl', models.IntegerField(default=0, verbose_name='数量')),
                ('je', models.DecimalField(blank=True, decimal_places=2, editable=False, max_digits=20, null=True, verbose_name='金额')),
                ('czsj', models.DateTimeField(default=django.utils.timezone.now, verbose_name='操作时间')),
                ('date', models.DateField(blank=True, editable=False, verbose_name='日期')),
                ('czz', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.Employee', to_field='name', verbose_name='操作者')),
                ('wzkc', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventory.WuZiKuCun', verbose_name='物资库存表')),
            ],
            options={
                'verbose_name_plural': '物资入库',
                'verbose_name': '物资入库',
            },
        ),
        migrations.AddField(
            model_name='wuzifafang',
            name='wzkc',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventory.WuZiKuCun', verbose_name='物资库存表'),
        ),
        migrations.AddField(
            model_name='wuzichuku',
            name='wzkc',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='inventory.WuZiKuCun', verbose_name='物资库存表'),
        ),
    ]
