# Generated by Django 5.1.9 on 2025-05-16 09:58

import access.models.tenancy
import django.db.models.deletion
import itam.models.itam_asset_base
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('access', '0010_company_alter_entity_entity_type_alter_person_dob_and_more'),
        ('accounting', '0001_initial'),
        ('itam', '0010_alter_software_organization'),
    ]

    operations = [
        migrations.CreateModel(
            name='ITAMAssetBase',
            fields=[
                ('assetbase_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='accounting.assetbase')),
                ('itam_type', models.CharField(blank=True, choices=itam.models.itam_asset_base.ITAMAssetBase.get_itam_model_type_choices, default='itam_base', help_text='IT Asset Type. (derived from IT asset model)', max_length=30, verbose_name='IT Asset Type')),
            ],
            options={
                'verbose_name': 'IT Asset',
                'verbose_name_plural': 'IT Assets',
                'ordering': ['id'],
                'sub_model_type': 'it_asset',
                'itam_sub_model_type': 'itam_base',
            },
            bases=('accounting.assetbase',),
        ),
        migrations.AlterField(
            model_name='device',
            name='organization',
            field=models.ForeignKey(help_text='Tenancy this belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.tenant', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Tenant'),
        ),
        migrations.AlterField(
            model_name='devicemodel',
            name='organization',
            field=models.ForeignKey(help_text='Tenancy this belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.tenant', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Tenant'),
        ),
        migrations.AlterField(
            model_name='deviceoperatingsystem',
            name='organization',
            field=models.ForeignKey(help_text='Tenancy this belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.tenant', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Tenant'),
        ),
        migrations.AlterField(
            model_name='devicesoftware',
            name='organization',
            field=models.ForeignKey(help_text='Tenancy this belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.tenant', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Tenant'),
        ),
        migrations.AlterField(
            model_name='devicetype',
            name='organization',
            field=models.ForeignKey(help_text='Tenancy this belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.tenant', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Tenant'),
        ),
        migrations.AlterField(
            model_name='operatingsystem',
            name='organization',
            field=models.ForeignKey(help_text='Tenancy this belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.tenant', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Tenant'),
        ),
        migrations.AlterField(
            model_name='operatingsystemversion',
            name='organization',
            field=models.ForeignKey(help_text='Tenancy this belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.tenant', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Tenant'),
        ),
        migrations.AlterField(
            model_name='software',
            name='organization',
            field=models.ForeignKey(help_text='Tenant this belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='software', to='access.tenant', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Tenant'),
        ),
        migrations.AlterField(
            model_name='softwarecategory',
            name='organization',
            field=models.ForeignKey(help_text='Tenancy this belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.tenant', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Tenant'),
        ),
        migrations.AlterField(
            model_name='softwareversion',
            name='organization',
            field=models.ForeignKey(help_text='Tenancy this belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.tenant', validators=[access.models.tenancy.TenancyObject.validatate_organization_exists], verbose_name='Tenant'),
        ),
    ]
