# Generated by Django 3.2.12 on 2022-08-15 06:02

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('hrm', '0002_initial'),
        ('opm', '0001_initial'),
        ('third', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('wf', '0001_initial'),
        ('am', '0002_initial'),
        ('system', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='oplworker',
            name='worker',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='作业人员'),
        ),
        migrations.AddField(
            model_name='oplcert',
            name='certificate',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hrm.certificate', verbose_name='关联证书'),
        ),
        migrations.AddField(
            model_name='oplcert',
            name='opl_worker',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='opm.oplworker', verbose_name='关联作业人员'),
        ),
        migrations.AddField(
            model_name='oplcate',
            name='close_options',
            field=models.ManyToManyField(related_name='oplcate_close_options', to='system.Dictionary', verbose_name='关闭工作'),
        ),
        migrations.AddField(
            model_name='oplcate',
            name='create_by',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='oplcate_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人'),
        ),
        migrations.AddField(
            model_name='oplcate',
            name='measure_options',
            field=models.ManyToManyField(related_name='oplcate_measure_options', to='system.Dictionary', verbose_name='控制措施'),
        ),
        migrations.AddField(
            model_name='oplcate',
            name='risk_options',
            field=models.ManyToManyField(related_name='oplcate_risk_options', to='system.Dictionary', verbose_name='风险分析'),
        ),
        migrations.AddField(
            model_name='oplcate',
            name='update_by',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='oplcate_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人'),
        ),
        migrations.AddField(
            model_name='oplcate',
            name='workflow',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='wf.workflow', verbose_name='使用的工作流'),
        ),
        migrations.AddField(
            model_name='opl',
            name='belong_dept',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='opl_belong_dept', to='system.dept', verbose_name='所属部门'),
        ),
        migrations.AddField(
            model_name='opl',
            name='cate',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='opm.oplcate', verbose_name='作业许可种类'),
        ),
        migrations.AddField(
            model_name='opl',
            name='charger',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='opl_charger', to=settings.AUTH_USER_MODEL, verbose_name='作业负责人'),
        ),
        migrations.AddField(
            model_name='opl',
            name='close_imgs',
            field=models.ManyToManyField(blank=True, related_name='opl_close_imgs', to='system.File', verbose_name='作业关闭照片'),
        ),
        migrations.AddField(
            model_name='opl',
            name='create_by',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='opl_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人'),
        ),
        migrations.AddField(
            model_name='opl',
            name='create_imgs',
            field=models.ManyToManyField(blank=True, related_name='opl_create_imgs', to='system.File', verbose_name='作业审批照片'),
        ),
        migrations.AddField(
            model_name='opl',
            name='dept_do',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='system.dept', verbose_name='作业部门'),
        ),
        migrations.AddField(
            model_name='opl',
            name='monitor',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='opl_monitor', to=settings.AUTH_USER_MODEL, verbose_name='作业监护人'),
        ),
        migrations.AddField(
            model_name='opl',
            name='operation',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='opl_operation', to='opm.operation', verbose_name='关联作业'),
        ),
        migrations.AddField(
            model_name='opl',
            name='ticket',
            field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='wf.ticket', verbose_name='关联工单'),
        ),
        migrations.AddField(
            model_name='opl',
            name='update_by',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='opl_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人'),
        ),
        migrations.AddField(
            model_name='opl',
            name='workers',
            field=models.ManyToManyField(through='opm.OplWorker', to=settings.AUTH_USER_MODEL, verbose_name='作业人员'),
        ),
        migrations.AddField(
            model_name='operation',
            name='area',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='am.area', verbose_name='作业区域'),
        ),
        migrations.AddField(
            model_name='operation',
            name='belong_dept',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='operation_belong_dept', to='system.dept', verbose_name='所属部门'),
        ),
        migrations.AddField(
            model_name='operation',
            name='cates',
            field=models.ManyToManyField(through='opm.Opl', to='opm.OplCate'),
        ),
        migrations.AddField(
            model_name='operation',
            name='coordinator',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='业务部门协调员'),
        ),
        migrations.AddField(
            model_name='operation',
            name='create_by',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='operation_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人'),
        ),
        migrations.AddField(
            model_name='operation',
            name='dept_bus',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='op_dept_bus', to='system.dept', verbose_name='业务部门'),
        ),
        migrations.AddField(
            model_name='operation',
            name='dept_ter',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='op_dept_ter', to='system.dept', verbose_name='属地部门'),
        ),
        migrations.AddField(
            model_name='operation',
            name='update_by',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='operation_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人'),
        ),
        migrations.AddField(
            model_name='operation',
            name='vchannels',
            field=models.ManyToManyField(to='third.TDevice', verbose_name='监控所用摄像头'),
        ),
        migrations.AddField(
            model_name='gascheck',
            name='checker',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='检测人'),
        ),
        migrations.AddField(
            model_name='gascheck',
            name='create_by',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='gascheck_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人'),
        ),
        migrations.AddField(
            model_name='gascheck',
            name='opl',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='opm.opl', verbose_name='关联作业许可'),
        ),
        migrations.AddField(
            model_name='gascheck',
            name='update_by',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='gascheck_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人'),
        ),
    ]
