# Generated by Django 5.1.2 on 2024-12-06 06:47

import access.models
import config_management.models.groups
import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('access', '0002_alter_organization_options_alter_team_options_and_more'),
        ('config_management', '0003_alter_configgroups_options_and_more'),
        ('itam', '0004_alter_deviceoperatingsystem_device_and_more'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='configgroups',
            options={'ordering': ['name'], 'verbose_name': 'Config Group', 'verbose_name_plural': 'Config Groups'},
        ),
        migrations.AlterModelOptions(
            name='configgroupsoftware',
            options={'ordering': ['-action', 'software'], 'verbose_name': 'Config Group Software', 'verbose_name_plural': 'Config Group Softwares'},
        ),
        migrations.AddField(
            model_name='configgroups',
            name='hosts',
            field=models.ManyToManyField(blank=True, help_text='Hosts that are part of this group', to='itam.device', verbose_name='Hosts'),
        ),
        migrations.AlterField(
            model_name='configgrouphosts',
            name='group',
            field=models.ForeignKey(help_text='Group that this host is part of', on_delete=django.db.models.deletion.CASCADE, to='config_management.configgroups', verbose_name='Group'),
        ),
        migrations.AlterField(
            model_name='configgrouphosts',
            name='host',
            field=models.ForeignKey(help_text='Host that will be apart of this config group', on_delete=django.db.models.deletion.CASCADE, to='itam.device', validators=[config_management.models.groups.ConfigGroupHosts.validate_host_no_parent_group], verbose_name='Host'),
        ),
        migrations.AlterField(
            model_name='configgrouphosts',
            name='id',
            field=models.AutoField(help_text='ID of this Group', primary_key=True, serialize=False, unique=True, verbose_name='ID'),
        ),
        migrations.AlterField(
            model_name='configgrouphosts',
            name='is_global',
            field=models.BooleanField(default=False, help_text='Is this a global object?', verbose_name='Global Object'),
        ),
        migrations.AlterField(
            model_name='configgrouphosts',
            name='model_notes',
            field=models.TextField(blank=True, default=None, help_text='Tid bits of information', null=True, verbose_name='Notes'),
        ),
        migrations.AlterField(
            model_name='configgrouphosts',
            name='organization',
            field=models.ForeignKey(help_text='Organization this belongs to', on_delete=django.db.models.deletion.CASCADE, to='access.organization', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Organization'),
        ),
        migrations.AlterField(
            model_name='configgroups',
            name='config',
            field=models.JSONField(blank=True, default=None, help_text='Configuration for this Group', null=True, validators=[config_management.models.groups.ConfigGroups.validate_config_keys_not_reserved], verbose_name='Configuration'),
        ),
        migrations.AlterField(
            model_name='configgroups',
            name='id',
            field=models.AutoField(help_text='ID of this Group', primary_key=True, serialize=False, unique=True, verbose_name='ID'),
        ),
        migrations.AlterField(
            model_name='configgroups',
            name='is_global',
            field=models.BooleanField(default=False, help_text='Is this a global object?', verbose_name='Global Object'),
        ),
        migrations.AlterField(
            model_name='configgroups',
            name='model_notes',
            field=models.TextField(blank=True, default=None, help_text='Tid bits of information', null=True, verbose_name='Notes'),
        ),
        migrations.AlterField(
            model_name='configgroups',
            name='name',
            field=models.CharField(help_text='Name of this Group', max_length=50, verbose_name='Name'),
        ),
        migrations.AlterField(
            model_name='configgroups',
            name='organization',
            field=models.ForeignKey(help_text='Organization this belongs to', on_delete=django.db.models.deletion.CASCADE, to='access.organization', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Organization'),
        ),
        migrations.AlterField(
            model_name='configgroups',
            name='parent',
            field=models.ForeignKey(blank=True, default=None, help_text='Parent of this Group', null=True, on_delete=django.db.models.deletion.SET_DEFAULT, to='config_management.configgroups', verbose_name='Parent Group'),
        ),
        migrations.AlterField(
            model_name='configgroupsoftware',
            name='action',
            field=models.IntegerField(blank=True, choices=[(1, 'Install'), (0, 'Remove')], default=None, help_text='ACtion to perform with this software', null=True, verbose_name='Action'),
        ),
        migrations.AlterField(
            model_name='configgroupsoftware',
            name='config_group',
            field=models.ForeignKey(default=None, help_text='Config group this softwre will be linked to', on_delete=django.db.models.deletion.CASCADE, to='config_management.configgroups', verbose_name='Config Group'),
        ),
        migrations.AlterField(
            model_name='configgroupsoftware',
            name='id',
            field=models.AutoField(help_text='ID of this Group', primary_key=True, serialize=False, unique=True, verbose_name='ID'),
        ),
        migrations.AlterField(
            model_name='configgroupsoftware',
            name='is_global',
            field=models.BooleanField(default=False, help_text='Is this a global object?', verbose_name='Global Object'),
        ),
        migrations.AlterField(
            model_name='configgroupsoftware',
            name='model_notes',
            field=models.TextField(blank=True, default=None, help_text='Tid bits of information', null=True, verbose_name='Notes'),
        ),
        migrations.AlterField(
            model_name='configgroupsoftware',
            name='organization',
            field=models.ForeignKey(help_text='Organization this belongs to', on_delete=django.db.models.deletion.CASCADE, to='access.organization', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Organization'),
        ),
        migrations.AlterField(
            model_name='configgroupsoftware',
            name='software',
            field=models.ForeignKey(default=None, help_text='Software to add to this config Group', on_delete=django.db.models.deletion.CASCADE, to='itam.software', verbose_name='Software'),
        ),
        migrations.AlterField(
            model_name='configgroupsoftware',
            name='version',
            field=models.ForeignKey(blank=True, default=None, help_text='Software Version for this config group', null=True, on_delete=django.db.models.deletion.CASCADE, to='itam.softwareversion', verbose_name='Verrsion'),
        ),
    ]
