# Generated by Django 4.1.9 on 2023-10-16 10:36

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


class Migration(migrations.Migration):
    dependencies = [
        ("extras", "0092_delete_jobresult"),
        ("netbox_sensors", "0001_initial"),
    ]

    operations = [
        migrations.CreateModel(
            name="DeviceConfiguration",
            fields=[
                ("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,
                    ),
                ),
                ("id", models.AutoField(primary_key=True, serialize=False)),
                ("creation_date", models.DateField(blank=True, null=True)),
                ("update_password", models.BooleanField(default=False)),
                ("update_date", models.DateField(blank=True, null=True)),
                ("configuration", models.JSONField(blank=True, null=True)),
                (
                    "device",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.PROTECT,
                        to="netbox_sensors.customdevice",
                    ),
                ),
                (
                    "tags",
                    taggit.managers.TaggableManager(
                        through="extras.TaggedItem", to="extras.Tag"
                    ),
                ),
            ],
            options={
                "ordering": ("creation_date",),
            },
        ),
    ]
