# Generated by Django 3.0.5 on 2021-03-12 06:40

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),
        ('system', '0008_auto_20210311_0919'),
        ('supervision', '0005_auto_20210312_1126'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='task',
            options={'verbose_name': '上报任务', 'verbose_name_plural': '上报任务'},
        ),
        migrations.RenameField(
            model_name='task',
            old_name='is_do',
            new_name='is_self',
        ),
        migrations.RemoveField(
            model_name='record',
            name='is_lock',
        ),
        migrations.RemoveField(
            model_name='record',
            name='updepart',
        ),
        migrations.RemoveField(
            model_name='record',
            name='upuser',
        ),
        migrations.AddField(
            model_name='record',
            name='belong_to',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='record_belong_to', to='system.Organization', verbose_name='所属部门'),
        ),
        migrations.AddField(
            model_name='record',
            name='create_by',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='record_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人'),
        ),
        migrations.AddField(
            model_name='record',
            name='end_date',
            field=models.DateField(blank=True, null=True, verbose_name='截止时间'),
        ),
        migrations.AddField(
            model_name='record',
            name='noteb',
            field=models.TextField(blank=True, null=True, verbose_name='上报说明'),
        ),
        migrations.AddField(
            model_name='record',
            name='state',
            field=models.CharField(choices=[('待上报', '待上报'), ('已上报', '已上报'), ('已确认', '已确认'), ('待整改', '待整改')], default='待上报', max_length=50, verbose_name='记录状态'),
        ),
        migrations.AddField(
            model_name='record',
            name='up_user',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='上报人'),
        ),
        migrations.AddField(
            model_name='record',
            name='update_by',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='record_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人'),
        ),
        migrations.AddField(
            model_name='task',
            name='contents',
            field=models.ManyToManyField(through='supervision.Record', to='supervision.Content'),
        ),
        migrations.AddField(
            model_name='task',
            name='depts',
            field=models.ManyToManyField(through='supervision.Record', to='system.Organization'),
        ),
        migrations.AddField(
            model_name='task',
            name='end_date',
            field=models.DateField(blank=True, null=True, verbose_name='截止时间'),
        ),
        migrations.AddField(
            model_name='task',
            name='note',
            field=models.TextField(blank=True, null=True, verbose_name='任务备注'),
        ),
        migrations.AddField(
            model_name='task',
            name='state',
            field=models.CharField(choices=[('创建中', '创建中'), ('执行中', '执行中'), ('已完成', '已完成')], default='创建中', max_length=50, verbose_name='任务状态'),
        ),
        migrations.AlterField(
            model_name='record',
            name='note',
            field=models.TextField(blank=True, null=True, verbose_name='上报备注'),
        ),
    ]
