# Generated by Django 3.0.7 on 2020-06-16 03:58

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 = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('system', '0019_auto_20200612_1448'),
        ('certset', '0002_auto_20200615_1707'),
    ]

    operations = [
        migrations.CreateModel(
            name='UnitType',
            fields=[
                ('id', models.AutoField(auto_created=True, 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='删除标记')),
                ('name', models.CharField(max_length=1000, verbose_name='单元类型名')),
                ('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='unittype_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人')),
            ],
            options={
                'verbose_name': '单元类型',
                'verbose_name_plural': '单元类型',
            },
        ),
        migrations.RemoveField(
            model_name='implementrule',
            name='units',
        ),
        migrations.AddField(
            model_name='implementrule',
            name='ccc_list',
            field=models.ManyToManyField(blank=True, related_name='implementrule_ccc_list', to='system.Dict', verbose_name='CCC产品认证目录'),
        ),
        migrations.AlterField(
            model_name='implementrule',
            name='pv_scope',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='implementrule_pv_scope', to='system.Dict', verbose_name='自愿性产品认证领域'),
        ),
        migrations.AlterField(
            model_name='implementrule',
            name='standards',
            field=models.ManyToManyField(blank=True, related_name='implementrules_standards', to='certset.Standard', verbose_name='依据标准'),
        ),
        migrations.DeleteModel(
            name='Unit',
        ),
        migrations.AddField(
            model_name='unittype',
            name='implementrule',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='unittype_implementrule', to='certset.ImplementRule', verbose_name='所属规则'),
        ),
        migrations.AddField(
            model_name='unittype',
            name='standard',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='unittype_standard', to='certset.Standard', verbose_name='采用标准'),
        ),
        migrations.AddField(
            model_name='unittype',
            name='update_by',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='unittype_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人'),
        ),
    ]
