# Generated by Django 3.1.4 on 2021-08-14 14:08

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),
        ('company', '0241_auto_20210807_1335'),
        ('inventory', '0107_auto_20210712_1433'),
    ]

    operations = [
        migrations.CreateModel(
            name='Receipt',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ancestor_id', models.IntegerField(db_index=True, verbose_name='企业ID')),
                ('qty', models.IntegerField(blank=True, null=True, verbose_name='确认数量')),
                ('details', models.JSONField(blank=True, default=list, null=True, verbose_name='收货明细')),
                ('dt', models.DateField(auto_now_add=True, db_index=True, verbose_name='确认日期')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='确认时间')),
                ('batch', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='receipt_batch', to='inventory.batch', verbose_name='发货Batch')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='receipt_company', to='company.company', verbose_name='经销商')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='receit_user', to=settings.AUTH_USER_MODEL, verbose_name='确认人')),
            ],
            options={
                'verbose_name': '收货确认',
                'verbose_name_plural': '收货确认',
            },
        ),
    ]
