# Generated by Django 4.2.1 on 2023-09-29 07:39

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Config',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(max_length=400, unique=True, validators=[django.core.validators.RegexValidator(message='identifier doesnt match condition ^[A-Za-z0-9\\.\\-:_,=\\/@]+$', regex='^[A-Za-z0-9\\.\\-:_,=\\/@]+$'), django.core.validators.MaxLengthValidator(400), django.core.validators.MinLengthValidator(1)])),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=400)),
                ('version', models.CharField(max_length=400)),
                ('is_local_config', models.BooleanField(default=True)),
                ('lookup_dimension_keys', models.JSONField(default=list)),
            ],
            options={
                'verbose_name': 'Config',
                'verbose_name_plural': 'Configs',
            },
        ),
        migrations.CreateModel(
            name='Data',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(max_length=400, unique=True, validators=[django.core.validators.RegexValidator(message='identifier doesnt match condition ^[A-Za-z0-9\\.\\-:_,=\\/@]+$', regex='^[A-Za-z0-9\\.\\-:_,=\\/@]+$'), django.core.validators.MaxLengthValidator(400), django.core.validators.MinLengthValidator(1)])),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=400)),
                ('is_template', models.BooleanField(default=False)),
                ('is_json', models.BooleanField(default=True)),
                ('txt_body', models.TextField(blank=True, null=True)),
                ('json_body', models.JSONField(default=dict)),
            ],
            options={
                'verbose_name': 'Data',
                'verbose_name_plural': 'Data',
            },
        ),
        migrations.CreateModel(
            name='Endpoint',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(max_length=400, unique=True, validators=[django.core.validators.RegexValidator(message='identifier doesnt match condition ^[A-Za-z0-9\\.\\-:_,=\\/@]+$', regex='^[A-Za-z0-9\\.\\-:_,=\\/@]+$'), django.core.validators.MaxLengthValidator(400), django.core.validators.MinLengthValidator(1)])),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=400)),
                ('url', models.TextField()),
                ('method', models.CharField(choices=[('POST', 'POST'), ('GET', 'GET'), ('DELETE', 'DELETE')], default='GET', max_length=400)),
                ('success_code', models.IntegerField()),
                ('body', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='data', to='models.data')),
            ],
            options={
                'verbose_name': 'Endpoint',
                'verbose_name_plural': 'Endpoints',
            },
        ),
        migrations.CreateModel(
            name='Exchange',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(max_length=400, unique=True, validators=[django.core.validators.RegexValidator(message='identifier doesnt match condition ^[A-Za-z0-9\\.\\-:_,=\\/@]+$', regex='^[A-Za-z0-9\\.\\-:_,=\\/@]+$'), django.core.validators.MaxLengthValidator(400), django.core.validators.MinLengthValidator(1)])),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=400)),
                ('attrs', models.JSONField(default=dict)),
            ],
            options={
                'verbose_name': 'Exchange',
                'verbose_name_plural': 'Exchanges',
            },
        ),
        migrations.CreateModel(
            name='Inbound',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(max_length=400, unique=True, validators=[django.core.validators.RegexValidator(message='identifier doesnt match condition ^[A-Za-z0-9\\.\\-:_,=\\/@]+$', regex='^[A-Za-z0-9\\.\\-:_,=\\/@]+$'), django.core.validators.MaxLengthValidator(400), django.core.validators.MinLengthValidator(1)])),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('status', models.CharField(choices=[('P', 'PENDING'), ('I', 'IN-PROGRESS'), ('E', 'ERROR'), ('C', 'COMPLETED')], default='P', max_length=1)),
                ('attempts', models.IntegerField(default=0)),
                ('debug_info', models.JSONField(default=dict)),
                ('name', models.CharField(max_length=400)),
                ('data', models.JSONField(default=dict)),
            ],
            options={
                'verbose_name': 'Inbound',
                'verbose_name_plural': 'Inbound',
            },
        ),
        migrations.CreateModel(
            name='Outbound',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(max_length=400, unique=True, validators=[django.core.validators.RegexValidator(message='identifier doesnt match condition ^[A-Za-z0-9\\.\\-:_,=\\/@]+$', regex='^[A-Za-z0-9\\.\\-:_,=\\/@]+$'), django.core.validators.MaxLengthValidator(400), django.core.validators.MinLengthValidator(1)])),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('status', models.CharField(choices=[('P', 'PENDING'), ('I', 'IN-PROGRESS'), ('E', 'ERROR'), ('C', 'COMPLETED')], default='P', max_length=1)),
                ('attempts', models.IntegerField(default=0)),
                ('debug_info', models.JSONField(default=dict)),
                ('name', models.CharField(max_length=400)),
                ('data', models.JSONField(default=dict)),
            ],
            options={
                'verbose_name': 'Outbound',
                'verbose_name_plural': 'Outbound',
            },
        ),
        migrations.CreateModel(
            name='Outpost',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(max_length=400, unique=True, validators=[django.core.validators.RegexValidator(message='identifier doesnt match condition ^[A-Za-z0-9\\.\\-:_,=\\/@]+$', regex='^[A-Za-z0-9\\.\\-:_,=\\/@]+$'), django.core.validators.MaxLengthValidator(400), django.core.validators.MinLengthValidator(1)])),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('msg_queue_info', models.JSONField(default=dict)),
                ('msg', models.JSONField(default=dict)),
                ('status', models.CharField(choices=[('P', 'PENDING'), ('I', 'IN-PROGRESS'), ('E', 'ERROR'), ('C', 'COMPLETED')], default='P', max_length=1)),
                ('attempts', models.IntegerField(default=0)),
                ('debug_info', models.JSONField(default=dict)),
            ],
            options={
                'verbose_name': 'Outpost',
                'verbose_name_plural': 'Outpost',
            },
        ),
        migrations.CreateModel(
            name='Reference',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(max_length=400, unique=True, validators=[django.core.validators.RegexValidator(message='identifier doesnt match condition ^[A-Za-z0-9\\.\\-:_,=\\/@]+$', regex='^[A-Za-z0-9\\.\\-:_,=\\/@]+$'), django.core.validators.MaxLengthValidator(400), django.core.validators.MinLengthValidator(1)])),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('type', models.CharField(max_length=400)),
                ('attrs', models.JSONField(default=dict)),
            ],
            options={
                'verbose_name': 'Reference',
                'verbose_name_plural': 'References',
            },
        ),
        migrations.CreateModel(
            name='Signal',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(max_length=400, unique=True, validators=[django.core.validators.RegexValidator(message='identifier doesnt match condition ^[A-Za-z0-9\\.\\-:_,=\\/@]+$', regex='^[A-Za-z0-9\\.\\-:_,=\\/@]+$'), django.core.validators.MaxLengthValidator(400), django.core.validators.MinLengthValidator(1)])),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=400)),
                ('delivery', models.CharField(max_length=400)),
                ('is_retain', models.BooleanField(default=False)),
            ],
            options={
                'verbose_name': 'Signal',
                'verbose_name_plural': 'Signals',
            },
        ),
        migrations.CreateModel(
            name='Source',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(max_length=400, unique=True, validators=[django.core.validators.RegexValidator(message='identifier doesnt match condition ^[A-Za-z0-9\\.\\-:_,=\\/@]+$', regex='^[A-Za-z0-9\\.\\-:_,=\\/@]+$'), django.core.validators.MaxLengthValidator(400), django.core.validators.MinLengthValidator(1)])),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=400)),
                ('type', models.CharField(max_length=400)),
                ('slug', models.SlugField()),
            ],
            options={
                'verbose_name': 'Source',
                'verbose_name_plural': 'Sources',
            },
        ),
        migrations.CreateModel(
            name='Webhook',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(max_length=400, unique=True, validators=[django.core.validators.RegexValidator(message='identifier doesnt match condition ^[A-Za-z0-9\\.\\-:_,=\\/@]+$', regex='^[A-Za-z0-9\\.\\-:_,=\\/@]+$'), django.core.validators.MaxLengthValidator(400), django.core.validators.MinLengthValidator(1)])),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('uniq_id', models.CharField(max_length=400)),
                ('endpoint', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='models.endpoint')),
                ('signal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='webhooks', to='models.signal')),
            ],
            options={
                'verbose_name': 'Webhook',
                'verbose_name_plural': 'Webhooks',
            },
        ),
        migrations.CreateModel(
            name='Setting',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(max_length=400, unique=True, validators=[django.core.validators.RegexValidator(message='identifier doesnt match condition ^[A-Za-z0-9\\.\\-:_,=\\/@]+$', regex='^[A-Za-z0-9\\.\\-:_,=\\/@]+$'), django.core.validators.MaxLengthValidator(400), django.core.validators.MinLengthValidator(1)])),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=400)),
                ('config', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='models.config')),
            ],
            options={
                'verbose_name': 'Setting',
                'verbose_name_plural': 'Settings',
            },
        ),
        migrations.CreateModel(
            name='Route',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(max_length=400, unique=True, validators=[django.core.validators.RegexValidator(message='identifier doesnt match condition ^[A-Za-z0-9\\.\\-:_,=\\/@]+$', regex='^[A-Za-z0-9\\.\\-:_,=\\/@]+$'), django.core.validators.MaxLengthValidator(400), django.core.validators.MinLengthValidator(1)])),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('routing_key', models.CharField(max_length=400)),
                ('exchange', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='models.exchange')),
            ],
            options={
                'verbose_name': 'Route',
                'verbose_name_plural': 'Routes',
            },
        ),
        migrations.CreateModel(
            name='Remote',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(max_length=400, unique=True, validators=[django.core.validators.RegexValidator(message='identifier doesnt match condition ^[A-Za-z0-9\\.\\-:_,=\\/@]+$', regex='^[A-Za-z0-9\\.\\-:_,=\\/@]+$'), django.core.validators.MaxLengthValidator(400), django.core.validators.MinLengthValidator(1)])),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('config', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='remote', to='models.config')),
                ('endpoint', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='models.endpoint')),
            ],
            options={
                'verbose_name': 'Remote',
                'verbose_name_plural': 'Remote',
            },
        ),
        migrations.CreateModel(
            name='Queue',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(max_length=400, unique=True, validators=[django.core.validators.RegexValidator(message='identifier doesnt match condition ^[A-Za-z0-9\\.\\-:_,=\\/@]+$', regex='^[A-Za-z0-9\\.\\-:_,=\\/@]+$'), django.core.validators.MaxLengthValidator(400), django.core.validators.MinLengthValidator(1)])),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=400)),
                ('is_declare', models.BooleanField(default=False)),
                ('is_consume', models.BooleanField(default=True)),
                ('declare_attrs', models.JSONField(default=dict)),
                ('consume_attrs', models.JSONField(default=dict)),
                ('routes', models.ManyToManyField(to='models.route')),
            ],
            options={
                'verbose_name': 'Queue',
                'verbose_name_plural': 'Queue',
            },
        ),
        migrations.CreateModel(
            name='Producer',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(max_length=400, unique=True, validators=[django.core.validators.RegexValidator(message='identifier doesnt match condition ^[A-Za-z0-9\\.\\-:_,=\\/@]+$', regex='^[A-Za-z0-9\\.\\-:_,=\\/@]+$'), django.core.validators.MaxLengthValidator(400), django.core.validators.MinLengthValidator(1)])),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('properties', models.JSONField(default=dict)),
                ('uniq_id', models.CharField(max_length=400)),
                ('route', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='models.route')),
                ('signal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='producers', to='models.signal')),
            ],
            options={
                'verbose_name': 'Route',
                'verbose_name_plural': 'Routes',
            },
        ),
        migrations.CreateModel(
            name='Param',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(max_length=400, unique=True, validators=[django.core.validators.RegexValidator(message='identifier doesnt match condition ^[A-Za-z0-9\\.\\-:_,=\\/@]+$', regex='^[A-Za-z0-9\\.\\-:_,=\\/@]+$'), django.core.validators.MaxLengthValidator(400), django.core.validators.MinLengthValidator(1)])),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('key', models.CharField(max_length=400)),
                ('value', models.CharField(max_length=400)),
                ('description', models.TextField()),
                ('endpoint', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='models.endpoint')),
            ],
            options={
                'verbose_name': 'Param',
                'verbose_name_plural': 'Params',
            },
        ),
        migrations.CreateModel(
            name='Media',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(max_length=400, unique=True, validators=[django.core.validators.RegexValidator(message='identifier doesnt match condition ^[A-Za-z0-9\\.\\-:_,=\\/@]+$', regex='^[A-Za-z0-9\\.\\-:_,=\\/@]+$'), django.core.validators.MaxLengthValidator(400), django.core.validators.MinLengthValidator(1)])),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('link', models.TextField()),
                ('media_id', models.CharField(max_length=400)),
                ('source', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='models.source')),
            ],
            options={
                'verbose_name': 'Media',
                'verbose_name_plural': 'Media',
            },
        ),
        migrations.CreateModel(
            name='Local',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(max_length=400, unique=True, validators=[django.core.validators.RegexValidator(message='identifier doesnt match condition ^[A-Za-z0-9\\.\\-:_,=\\/@]+$', regex='^[A-Za-z0-9\\.\\-:_,=\\/@]+$'), django.core.validators.MaxLengthValidator(400), django.core.validators.MinLengthValidator(1)])),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('data', models.JSONField(default=dict)),
                ('config', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='local', to='models.config')),
            ],
            options={
                'verbose_name': 'Local',
                'verbose_name_plural': 'Local',
            },
        ),
        migrations.CreateModel(
            name='Header',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(max_length=400, unique=True, validators=[django.core.validators.RegexValidator(message='identifier doesnt match condition ^[A-Za-z0-9\\.\\-:_,=\\/@]+$', regex='^[A-Za-z0-9\\.\\-:_,=\\/@]+$'), django.core.validators.MaxLengthValidator(400), django.core.validators.MinLengthValidator(1)])),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('key', models.CharField(max_length=400)),
                ('value', models.CharField(max_length=400)),
                ('description', models.TextField()),
                ('endpoint', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='headers', to='models.endpoint')),
            ],
            options={
                'verbose_name': 'Header',
                'verbose_name_plural': 'Headers',
            },
        ),
        migrations.CreateModel(
            name='Group',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(max_length=400, unique=True, validators=[django.core.validators.RegexValidator(message='identifier doesnt match condition ^[A-Za-z0-9\\.\\-:_,=\\/@]+$', regex='^[A-Za-z0-9\\.\\-:_,=\\/@]+$'), django.core.validators.MaxLengthValidator(400), django.core.validators.MinLengthValidator(1)])),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('type', models.CharField(max_length=400)),
                ('name', models.CharField(max_length=400, unique=True)),
                ('slug', models.SlugField()),
                ('description', models.TextField(blank=True)),
                ('groups', models.ManyToManyField(to='models.group')),
                ('media', models.ManyToManyField(to='models.media')),
                ('members', models.ManyToManyField(to='models.reference')),
                ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='parents', to='models.group')),
            ],
            options={
                'verbose_name': 'Group',
                'verbose_name_plural': 'Groups',
            },
        ),
    ]
