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

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('hrm', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='GasCheck',
            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='删除标记')),
                ('check_time', models.DateTimeField(verbose_name='检测时间')),
                ('check_place', models.CharField(max_length=100, verbose_name='检测部位')),
                ('o2', models.DecimalField(blank=True, decimal_places=1, max_digits=3, null=True)),
                ('co', models.PositiveSmallIntegerField(blank=True, null=True)),
                ('h2s', models.PositiveSmallIntegerField(blank=True, null=True)),
                ('lel', models.DecimalField(blank=True, decimal_places=1, max_digits=3, null=True)),
                ('f5', models.CharField(blank=True, max_length=10, null=True)),
                ('is_ok', models.BooleanField(default=True, verbose_name='是否正常')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Operation',
            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='删除标记')),
                ('number', models.CharField(blank=True, max_length=20, null=True, verbose_name='作业编号')),
                ('name', models.CharField(max_length=200, verbose_name='作业简述')),
                ('state', models.PositiveSmallIntegerField(default=10, verbose_name='作业状态')),
                ('place', models.TextField(blank=True, null=True, verbose_name='具体地点')),
                ('start_time', models.DateTimeField(verbose_name='作业开始时间')),
                ('end_time', models.DateTimeField(verbose_name='作业结束时间')),
                ('state_work', models.CharField(help_text='运行/停机/检修', max_length=20, verbose_name='生产状态')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Opl',
            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='删除标记')),
                ('number', models.CharField(blank=True, max_length=20, null=True, verbose_name='作业许可编号')),
                ('level', models.CharField(blank=True, help_text='特技/三级/二级/主干道/次干道', max_length=20, null=True, verbose_name='作业级别')),
                ('start_time', models.DateTimeField(blank=True, null=True, verbose_name='作业开始时间')),
                ('end_time', models.DateTimeField(blank=True, null=True, verbose_name='作业结束时间')),
                ('work_time', models.DateTimeField(blank=True, null=True, verbose_name='安装/拆除时间')),
                ('accept_time', models.DateTimeField(blank=True, null=True, verbose_name='验收时间')),
                ('work_type', models.CharField(blank=True, max_length=20, null=True, verbose_name='安装/拆除')),
                ('power', models.PositiveIntegerField(blank=True, null=True, verbose_name='用电功率')),
                ('power_to', models.CharField(blank=True, max_length=20, null=True, verbose_name='用电地点')),
                ('power_from', models.CharField(blank=True, max_length=20, null=True, verbose_name='电源接入点')),
                ('power_end_time', models.DateTimeField(blank=True, null=True, verbose_name='用电截至')),
                ('power_start_time', models.DateTimeField(blank=True, null=True, verbose_name='用电开始')),
                ('power_days', models.PositiveSmallIntegerField(blank=True, null=True, verbose_name='计划用电天数')),
                ('other_risk', models.TextField(blank=True, null=True, verbose_name='其他风险')),
                ('other_emr', models.TextField(blank=True, null=True, verbose_name='其他应急处置')),
                ('escape_route', models.TextField(blank=True, null=True, verbose_name='逃生路径')),
                ('risks_checked', models.JSONField(blank=True, default=list, verbose_name='风险选择')),
                ('measures_checked', models.JSONField(blank=True, default=list, verbose_name='措施选择')),
                ('close_note', models.PositiveSmallIntegerField(blank=True, choices=[(10, '作业正常结束'), (20, '因计划改变停止作业'), (30, '因发生异常终止作业'), (40, '其他')], help_text='正常结束/计划改变停止/发生异常停止/其他', null=True, verbose_name='作业关闭情况')),
                ('close_dos', models.JSONField(blank=True, default=list, verbose_name='关闭工作')),
                ('close_desc', models.TextField(blank=True, null=True, verbose_name='作业关闭描述')),
                ('mtask_id', models.CharField(blank=True, max_length=200, null=True, verbose_name='视频监控任务ID')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='OplCate',
            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='删除标记')),
                ('code', models.CharField(max_length=10, unique=True, verbose_name='标识')),
                ('name', models.CharField(max_length=20, unique=True, verbose_name='名称')),
                ('description', models.TextField(blank=True, null=True, verbose_name='描述')),
                ('template_export', models.TextField(blank=True, null=True, verbose_name='导出word模板')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='OplCert',
            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='删除标记')),
                ('name', models.CharField(max_length=20, verbose_name='证书名称')),
                ('number', models.CharField(max_length=20, verbose_name='证书编号')),
                ('type', models.PositiveSmallIntegerField(default=10, verbose_name='证书类型')),
                ('issue_date', models.DateField(verbose_name='发证日期')),
                ('expiration_date', models.DateField(verbose_name='有效期')),
                ('review_date', models.DateField(verbose_name='下一次复审日期')),
                ('file', models.TextField(blank=True, null=True, verbose_name='文件地址')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='OplWorker',
            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='删除标记')),
                ('duty', models.CharField(blank=True, help_text='作业人员/起重司机/司索人员/起重指挥/电工', max_length=100, null=True, verbose_name='工作职责')),
                ('certificates', models.ManyToManyField(through='opm.OplCert', to='hrm.Certificate', verbose_name='关联证书')),
                ('opl', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='opm.opl', verbose_name='作业许可')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
