# Generated by Django 5.0.2 on 2024-02-26 12:59

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('wireguard', '0014_alter_wireguardinstance_dns_primary_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='RedirectRule',
            fields=[
                ('description', models.CharField(blank=True, max_length=100, null=True)),
                ('protocol', models.CharField(choices=[('tcp', 'TCP'), ('udp', 'UDP')], default='tcp', max_length=3)),
                ('port', models.PositiveIntegerField(default=8080)),
                ('add_forward_rule', models.BooleanField(default=True)),
                ('ip_address', models.GenericIPAddressField(blank=True, null=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('peer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='wireguard.peer')),
                ('wireguard_instance', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='wireguard.wireguardinstance')),
            ],
            options={
                'unique_together': {('port', 'protocol')},
            },
        ),
    ]
