# Generated by Django 2.0.13 on 2019-03-12 10:23

import django.contrib.postgres.fields
import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='NotificationsConfig',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('location', models.URLField(help_text='API Root of the NC to use', verbose_name='location')),
            ],
            options={
                'verbose_name': 'Notificatiescomponentconfiguratie',
            },
        ),
        migrations.CreateModel(
            name='Subscription',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('callback_url', models.URLField(help_text='Where to send the notifications (webhook url)', verbose_name='callback url')),
                ('client_id', models.CharField(help_text='Client ID to construct the auth token', max_length=50, verbose_name='client ID')),
                ('secret', models.CharField(help_text='Secret to construct the auth token', max_length=50, verbose_name='client secret')),
                ('channels', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=100), help_text='Comma-separated list of channels to subscribe to', size=None, verbose_name='channels')),
                ('config', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='notifications.NotificationsConfig')),
            ],
            options={
                'verbose_name': 'Webhook subscription',
                'verbose_name_plural': 'Webhook subscriptions',
            },
        ),
    ]
