# Generated by Django 5.0.9 on 2024-11-21 15:00

import django.db.models.deletion
import taggit.managers
import timezone_field.fields
import utilities.json
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('extras', '0121_customfield_related_object_filter'),
        ('ipam', '0070_vlangroup_vlan_id_ranges'),
        ('sop_infra', '0011_remove_sopinfra_ad_cumulative_users'),
    ]

    operations = [
        migrations.AddField(
            model_name='sopinfra',
            name='enabled',
            field=models.CharField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='sopinfra',
            name='valid',
            field=models.CharField(blank=True, null=True),
        ),
        migrations.CreateModel(
            name='PrismaComputedAccessLocation',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
                ('created', models.DateTimeField(auto_now_add=True, null=True)),
                ('last_updated', models.DateTimeField(auto_now=True, null=True)),
                ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
                ('name', models.CharField(blank=True, unique=True)),
                ('slug', models.SlugField(blank=True, max_length=100, unique=True)),
                ('strata_id', models.CharField(blank=True, unique=True)),
                ('strata_name', models.CharField(blank=True)),
                ('bandwidth', models.PositiveBigIntegerField(blank=True)),
                ('tags', taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag')),
            ],
            options={
                'verbose_name': 'PRISMA compute location',
                'verbose_name_plural': 'PRISMA compute locations',
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PrismaAccessLocation',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
                ('created', models.DateTimeField(auto_now_add=True, null=True)),
                ('last_updated', models.DateTimeField(auto_now=True, null=True)),
                ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
                ('name', models.CharField(blank=True, unique=True)),
                ('slug', models.SlugField(blank=True, max_length=100, unique=True)),
                ('physical_address', models.CharField(blank=True, max_length=200, null=True)),
                ('time_zone', timezone_field.fields.TimeZoneField(blank=True, null=True)),
                ('latitude', models.DecimalField(blank=True, decimal_places=6, max_digits=8, null=True)),
                ('longitude', models.DecimalField(blank=True, decimal_places=6, max_digits=9, null=True)),
                ('tags', taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag')),
                ('compute_location', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='sop_infra.prismacomputedaccesslocation')),
            ],
            options={
                'verbose_name': 'PRISMA access location',
                'verbose_name_plural': 'PRISMA access locations',
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PrismaEndpoint',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
                ('created', models.DateTimeField(auto_now_add=True, null=True)),
                ('last_updated', models.DateTimeField(auto_now=True, null=True)),
                ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
                ('name', models.CharField(unique=True)),
                ('slug', models.SlugField(blank=True, max_length=100, unique=True)),
                ('access_location', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='sop_infra.prismaaccesslocation')),
                ('ip_address', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='ipam.ipaddress')),
                ('tags', taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag')),
            ],
            options={
                'verbose_name': 'PRISMA endpoint',
                'verbose_name_plural': 'PRISMA endpoints',
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='sopinfra',
            name='endpoint',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='sop_infra.prismaendpoint'),
        ),
    ]
