# 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 = [
        ('opm', '0001_initial'),
        ('third', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('ecm', '0001_initial'),
        ('am', '0002_initial'),
        ('system', '0001_initial'),
        ('hrm', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='remind',
            name='recipient',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='接收人'),
        ),
        migrations.AddField(
            model_name='notifysetting',
            name='create_by',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='notifysetting_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人'),
        ),
        migrations.AddField(
            model_name='notifysetting',
            name='event_cate',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ecm.eventcate', verbose_name='关联事件种类'),
        ),
        migrations.AddField(
            model_name='notifysetting',
            name='post',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='system.post', verbose_name='提醒岗位'),
        ),
        migrations.AddField(
            model_name='notifysetting',
            name='update_by',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='notifysetting_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人'),
        ),
        migrations.AddField(
            model_name='notifysetting',
            name='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='eventdo',
            name='cate',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='do_cate', to='ecm.eventcate', verbose_name='关联事件种类'),
        ),
        migrations.AddField(
            model_name='eventdo',
            name='event',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ecm.event', verbose_name='关联事件'),
        ),
        migrations.AddField(
            model_name='eventdo',
            name='handle_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='eventcate',
            name='create_by',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='eventcate_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人'),
        ),
        migrations.AddField(
            model_name='eventcate',
            name='opl_cates',
            field=models.ManyToManyField(to='opm.OplCate', verbose_name='关联许可证'),
        ),
        migrations.AddField(
            model_name='eventcate',
            name='speakers',
            field=models.ManyToManyField(blank=True, related_name='ec_speakers', to='third.TDevice', verbose_name='固定喇叭'),
        ),
        migrations.AddField(
            model_name='eventcate',
            name='update_by',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='eventcate_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人'),
        ),
        migrations.AddField(
            model_name='event',
            name='area',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='am.area', verbose_name='发生区域'),
        ),
        migrations.AddField(
            model_name='event',
            name='belong_dept',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='event_belong_dept', to='system.dept', verbose_name='所属部门'),
        ),
        migrations.AddField(
            model_name='event',
            name='cates',
            field=models.ManyToManyField(through='ecm.Eventdo', to='ecm.EventCate', verbose_name='关联事件种类'),
        ),
        migrations.AddField(
            model_name='event',
            name='create_by',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='event_create_by', to=settings.AUTH_USER_MODEL, verbose_name='创建人'),
        ),
        migrations.AddField(
            model_name='event',
            name='employee',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='hrm.employee', verbose_name='当事人'),
        ),
        migrations.AddField(
            model_name='event',
            name='handle_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='event',
            name='opl',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='opm.opl', verbose_name='关联许可证'),
        ),
        migrations.AddField(
            model_name='event',
            name='update_by',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='event_update_by', to=settings.AUTH_USER_MODEL, verbose_name='最后编辑人'),
        ),
        migrations.AddField(
            model_name='event',
            name='vchannel',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='third.tdevice', verbose_name='抓拍设备'),
        ),
        migrations.AddField(
            model_name='algochannel',
            name='algo',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ecm.eventcate', verbose_name='关联算法'),
        ),
        migrations.AddField(
            model_name='algochannel',
            name='vchannel',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='third.tdevice', verbose_name='视频通道'),
        ),
        migrations.AlterUniqueTogether(
            name='algochannel',
            unique_together={('algo', 'vchannel')},
        ),
    ]
