# Generated by Django 2.2.4 on 2019-11-22 15:28

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

import ip_whitelist.validators


class Migration(migrations.Migration):
    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="AllowedIP",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("owner", models.CharField(max_length=255, verbose_name="Eigenaar")),
                (
                    "address",
                    models.CharField(
                        max_length=15,
                        unique=True,
                        validators=[django.core.validators.validate_ipv4_address],
                        verbose_name="Address",
                    ),
                ),
            ],
            options={
                "verbose_name": "IP whitelist - adres",
                "verbose_name_plural": "IP whitelist - adressen",
            },
        ),
        migrations.CreateModel(
            name="AllowedIPRange",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("owner", models.CharField(max_length=255, verbose_name="Eigenaar")),
                (
                    "range",
                    models.CharField(
                        max_length=19,
                        unique=True,
                        validators=[
                            ip_whitelist.validators.validate_allowed_range_field
                        ],
                        verbose_name="Range",
                    ),
                ),
            ],
            options={
                "verbose_name": "IP whitelist - adres reeks",
                "verbose_name_plural": "IP whitelist - reeksen",
            },
        ),
    ]
