# Generated by Django 3.1.4 on 2023-03-23 14:52

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', '0323_auto_20230304_1014'),
        ('collection', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='ConsumeLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('direction', models.SmallIntegerField(choices=[(1, '增加'), (-1, '减少'), (0, '不变')], verbose_name='库存影响')),
                ('qty', models.IntegerField(blank=True, null=True, verbose_name='数量')),
                ('unit', models.SmallIntegerField(blank=True, choices=[(0, '毫升'), (3, '箱'), (2, '盒'), (1, '瓶')], default=0, 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='时间')),
                ('remark', models.CharField(blank=True, max_length=100, null=True, verbose_name='备注说明')),
                ('artical', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='ConsumeLogArtical', to='collection.artical', verbose_name='藏品')),
                ('collector', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='ConsumeLogCollector', to='collection.collector', verbose_name='收藏人')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='ConsumeLogCompany', to='company.company', verbose_name='所属企业')),
            ],
            options={
                'verbose_name': '消费日志',
                'verbose_name_plural': '消费日志',
            },
        ),
        migrations.CreateModel(
            name='AdjLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('direction', models.SmallIntegerField(choices=[(1, '增加'), (-1, '减少'), (0, '不变')], verbose_name='库存影响')),
                ('qty', models.IntegerField(blank=True, null=True, verbose_name='数量')),
                ('unit', models.SmallIntegerField(blank=True, choices=[(0, '毫升'), (3, '箱'), (2, '盒'), (1, '瓶')], default=0, 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='时间')),
                ('remark', models.CharField(blank=True, max_length=100, null=True, verbose_name='备注说明')),
                ('artical', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='AdjLogArtical', to='collection.artical', verbose_name='藏品')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='AdjLogCompany', to='company.company', verbose_name='所属企业')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='AdjLogUser', to=settings.AUTH_USER_MODEL, verbose_name='操作人')),
            ],
            options={
                'verbose_name': '后台修改日志',
                'verbose_name_plural': '后台修改日志',
            },
        ),
    ]
