# Generated by Django 2.2.26 on 2022-01-12 21:32

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


class Migration(migrations.Migration):

    dependencies = [
        ("contenttypes", "0002_remove_content_type_name"),
        ("webapp", "0077_templatequestion_deleted"),
    ]

    operations = [
        migrations.CreateModel(
            name="BaseWebhook",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=255)),
                ("url", models.URLField()),
                ("kaehmy_submit", models.BooleanField(default=False)),
                ("ohlhafv_submit", models.BooleanField(default=False)),
                ("feed_published", models.BooleanField(default=False)),
                ("jobad_published", models.BooleanField(default=False)),
                ("event_published", models.BooleanField(default=False)),
                ("signup_opened", models.BooleanField(default=False)),
                (
                    "polymorphic_ctype",
                    models.ForeignKey(
                        editable=False,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="polymorphic_webapp.basewebhook_set+",
                        to="contenttypes.ContentType",
                    ),
                ),
            ],
            options={
                "abstract": False,
                "base_manager_name": "objects",
            },
        ),
        migrations.CreateModel(
            name="TelegramHook",
            fields=[
                (
                    "basewebhook_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="webapp.BaseWebhook",
                    ),
                ),
                ("channel_id", models.CharField(max_length=255, unique=True)),
            ],
            options={
                "verbose_name": "Telegram channel",
                "verbose_name_plural": "Telegram channels",
            },
            bases=("webapp.basewebhook",),
        ),
        migrations.CreateModel(
            name="GenericWebhook",
            fields=[],
            options={
                "verbose_name": "Webhook",
                "verbose_name_plural": "Webhooks",
                "proxy": True,
                "indexes": [],
                "constraints": [],
            },
            bases=("webapp.basewebhook",),
        ),
    ]
