# 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 = [
    ]

    operations = [
        migrations.CreateModel(
            name='AlgoChannel',
            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='删除标记')),
                ('always_on', models.BooleanField(default=True, verbose_name='始终开启')),
            ],
        ),
        migrations.CreateModel(
            name='Event',
            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='删除标记')),
                ('face_img', models.CharField(blank=True, max_length=1000, null=True, verbose_name='人脸照')),
                ('global_img', models.CharField(blank=True, max_length=1000, null=True, verbose_name='全景照')),
                ('location', models.JSONField(blank=True, default=dict, verbose_name='事件点位坐标')),
                ('obj_cate', models.CharField(help_text='people(人员)/...', max_length=20, verbose_name='发生对象')),
                ('msg', models.TextField(blank=True, null=True, verbose_name='事件文本')),
                ('voice_msg', models.TextField(blank=True, null=True, verbose_name='语音文本')),
                ('voice', models.TextField(blank=True, null=True, verbose_name='语音地址')),
                ('is_timeout', models.BooleanField(default=False, verbose_name='是否超时')),
                ('mark', models.PositiveSmallIntegerField(default=10, help_text='10(正常)/20(误报)', verbose_name='事件标记')),
                ('happen_time', models.DateTimeField(blank=True, null=True, verbose_name='事件发生时间')),
                ('handle_time', models.DateTimeField(blank=True, null=True, verbose_name='处理时间')),
                ('handle_desc', models.TextField(blank=True, null=True, verbose_name='处理描述')),
                ('is_pushed', models.BooleanField(default=False, verbose_name='是否已推送')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='EventCate',
            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=20, unique=True, verbose_name='标识')),
                ('name', models.CharField(max_length=20, unique=True, verbose_name='名称')),
                ('priority', models.PositiveSmallIntegerField(default=1, help_text='1-99', verbose_name='优先级')),
                ('trigger', models.PositiveSmallIntegerField(choices=[(10, '监控'), (20, '定位')], default=10, verbose_name='触发方式')),
                ('self_algo', models.BooleanField(default=False, verbose_name='识别算法')),
                ('speaker_on', models.BooleanField(default=True, verbose_name='开启喇叭报警')),
                ('voice_person', models.PositiveSmallIntegerField(default=0, help_text='0女声3男声', verbose_name='声音选择')),
                ('voice_num', models.PositiveSmallIntegerField(default=2, verbose_name='播放次数')),
                ('filter_area_level', models.PositiveSmallIntegerField(choices=[(10, '办公'), (20, '生产一般'), (30, '生产重点'), (40, '四级')], default=10, verbose_name='固定喇叭区域级别过滤')),
                ('hanle_minute', models.PositiveSmallIntegerField(default=0, help_text='超过处理时间事件状态变为超时未处理,0代表未配置', verbose_name='处理时间')),
                ('same_allow_minute', models.PositiveSmallIntegerField(default=0, help_text='同一对象同事件多长时间内不再触发, 0代表一直触发', verbose_name='允许时间')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Eventdo',
            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='删除标记')),
                ('handle_time', models.DateTimeField(blank=True, null=True, verbose_name='处理时间')),
                ('handle_desc', models.TextField(blank=True, null=True, verbose_name='处理描述')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='NotifySetting',
            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='删除标记')),
                ('obj_cate', models.CharField(help_text='post岗位/user用户/variable变量', max_length=20, verbose_name='提醒对象')),
                ('variable', models.CharField(blank=True, help_text='self(本人)/area_manager(区域负责人)/visit_receptionist(访客接待人)', max_length=20, null=True, verbose_name='提醒变量')),
                ('filter_recipient', models.PositiveSmallIntegerField(blank=True, null=True, verbose_name='提醒人员过滤')),
                ('filter_area_level', models.PositiveSmallIntegerField(blank=True, null=True, verbose_name='区域级别过滤')),
                ('sms_enable', models.BooleanField(default=False, verbose_name='短信通知')),
                ('wechat_enable', models.BooleanField(default=False, verbose_name='开启微信通知')),
                ('can_handle', models.BooleanField(default=False, verbose_name='是否可处理')),
                ('sort', models.PositiveIntegerField(default=1, verbose_name='排序')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Remind',
            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='删除标记')),
                ('msg', models.TextField(blank=True, null=True, verbose_name='推送文本')),
                ('is_read', models.BooleanField(default=False, verbose_name='站内信已读')),
                ('can_handle', models.BooleanField(default=False, verbose_name='是否可处理')),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ecm.event', verbose_name='关联事件')),
                ('notify_setting', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='ecm.notifysetting', verbose_name='通过哪个配置')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
