# Generated by Django 2.0.5 on 2018-05-15 16:13

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


class Migration(migrations.Migration):

    dependencies = [
        ('zconnect', '0006_user_phone_number'),
    ]

    operations = [
        migrations.CreateModel(
            name='ActivitySubscription',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('category', models.CharField(max_length=50)),
                ('min_severity', models.IntegerField(choices=[(0, 0), (10, 10), (20, 20), (30, 30), (40, 40), (50, 50)], default=0)),
                ('type', models.CharField(choices=[('sms', 'sms'), ('email', 'email'), ('push', 'push')], max_length=50)),
            ],
        ),
        migrations.AddField(
            model_name='activitysubscription',
            name='organization',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='organizations.Organization'),
        ),
        migrations.AddField(
            model_name='activitysubscription',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterUniqueTogether(
            name='activitysubscription',
            unique_together={('user', 'organization', 'category', 'min_severity', 'type')},
        ),
    ]
