# Generated by Django 5.1.4 on 2025-01-16 20:58

"""Introduce endpoint and sync-process models for the current plugin architecture."""

import django.core.validators
import django.db.models.deletion
import taggit.managers
import utilities.json
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('extras', '0122_charfield_null_choices'),
        ('ipam', '0076_natural_ordering'),
        ('netbox_proxbox', '0003_auto_20210419_2330'),
    ]

    operations = [
        migrations.CreateModel(
            name='FastAPIEndpoint',
            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(max_length=255)),
                ('port', models.PositiveIntegerField(default=8800, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(65535)])),
                ('verify_ssl', models.BooleanField(default=True)),
                ('ip_address', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='ipam.ipaddress')),
                ('tags', taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag')),
            ],
            options={
                'verbose_name_plural': 'FastAPI Endpoints',
                'unique_together': {('name', 'ip_address')},
            },
        ),
        migrations.CreateModel(
            name='NetboxEndpoint',
            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(max_length=255)),
                ('port', models.PositiveIntegerField(default=443, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(65535)])),
                ('token', models.CharField(max_length=255)),
                ('verify_ssl', models.BooleanField(default=True)),
                ('ip_address', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='ipam.ipaddress')),
                ('tags', taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag')),
            ],
            options={
                'verbose_name_plural': 'Netbox Endpoints',
                'unique_together': {('name', 'ip_address')},
            },
        ),
        migrations.CreateModel(
            name='ProxmoxEndpoint',
            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, max_length=255, null=True)),
                ('port', models.PositiveIntegerField(default=8006, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(65535)])),
                ('mode', models.CharField(default='undefined', max_length=255)),
                ('version', models.CharField(blank=True, max_length=20, null=True)),
                ('repoid', models.CharField(blank=True, max_length=16, null=True)),
                ('username', models.CharField(default='root@pam', max_length=255)),
                ('password', models.CharField(blank=True, max_length=255, null=True)),
                ('token_name', models.CharField(max_length=255)),
                ('token_value', models.CharField(max_length=255)),
                ('verify_ssl', models.BooleanField(default=True)),
                ('ip_address', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='ipam.ipaddress')),
                ('tags', taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag')),
            ],
            options={
                'verbose_name_plural': 'Proxmox Endpoints',
                'ordering': ('name',),
                'unique_together': {('name', 'ip_address')},
            },
        ),
        migrations.DeleteModel(
            name='ProxmoxVM',
        ),
    ]
