# Generated by Django 3.2.12 on 2023-10-31 01:44

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


class Migration(migrations.Migration):

    dependencies = [
        ('mtm', '0020_material_cate'),
        ('system', '0002_myschedule'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('wpm', '0016_auto_20231030_1645'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='mlog',
            name='count_real_weight',
        ),
        migrations.AddField(
            model_name='mlog',
            name='count_real_eweight',
            field=models.FloatField(default=0, verbose_name='单数重量'),
        ),
        migrations.AlterField(
            model_name='mlog',
            name='handle_user',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='mlog_handle_user', to=settings.AUTH_USER_MODEL, verbose_name='操作人'),
        ),
        migrations.AlterField(
            model_name='mlog',
            name='note',
            field=models.TextField(default='', verbose_name='备注'),
        ),
        migrations.CreateModel(
            name='Handover',
            fields=[
                ('id', models.CharField(editable=False, help_text='主键ID', max_length=20, primary_key=True, serialize=False, verbose_name='主键ID')),
                ('create_time', models.DateTimeField(default=django.utils.timezone.now, help_text='创建时间', verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, help_text='修改时间', verbose_name='修改时间')),
                ('is_deleted', models.BooleanField(default=False, help_text='删除标记', verbose_name='删除标记')),
                ('send_date', models.DateField(verbose_name='送料日期')),
                ('batch', models.CharField(max_length=50, verbose_name='批次号')),
                ('count', models.PositiveIntegerField(default=0, verbose_name='送料数')),
                ('count_eweight', models.FloatField(default=0, verbose_name='单数重量')),
                ('doin_date', models.DateField(blank=True, null=True, verbose_name='加料日期')),
                ('doout_date', models.DateField(blank=True, null=True, verbose_name='出料日期')),
                ('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='handover_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人')),
                ('material', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='mtm.material', verbose_name='物料')),
                ('mlog', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='handover_mlog', to='wpm.mlog', verbose_name='关联日志记录')),
                ('recive_dept', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='handover_recive_dept', to='system.dept', verbose_name='接收部门')),
                ('recive_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='接收人')),
                ('send_dept', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='handover_send_dept', to='system.dept', verbose_name='送料部门')),
                ('update_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='handover_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
