# Generated by Django 5.1 on 2024-10-19 13:56

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('artd_customer', '0009_customergroup_partner'),
        ('artd_location', '0002_alter_city_created_at_alter_city_status_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='MacroTaxSegment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, help_text='Date time on which the object was created.', verbose_name='Created at')),
                ('updated_at', models.DateTimeField(auto_now=True, help_text='Date time on which the object was last updated.', verbose_name='Updated at')),
                ('status', models.BooleanField(default=True, help_text='Status of the object.', verbose_name='Status')),
                ('source', models.JSONField(blank=True, help_text='Source of the object.', null=True, verbose_name='Source')),
                ('external_id', models.CharField(blank=True, help_text='External ID of the object.', max_length=100, null=True, verbose_name='External ID')),
                ('name', models.CharField(help_text='Name of the macroTaxSegment.', max_length=250, verbose_name='Name')),
                ('code', models.CharField(help_text='Code of the macrosegment.', max_length=250, verbose_name='Code')),
                ('country', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='artd_location.country')),
            ],
            options={
                'verbose_name': 'MacroTaxSegment',
                'verbose_name_plural': 'Macrosegments',
            },
        ),
        migrations.CreateModel(
            name='TaxSegment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, help_text='Date time on which the object was created.', verbose_name='Created at')),
                ('updated_at', models.DateTimeField(auto_now=True, help_text='Date time on which the object was last updated.', verbose_name='Updated at')),
                ('status', models.BooleanField(default=True, help_text='Status of the object.', verbose_name='Status')),
                ('source', models.JSONField(blank=True, help_text='Source of the object.', null=True, verbose_name='Source')),
                ('external_id', models.CharField(blank=True, help_text='External ID of the object.', max_length=100, null=True, verbose_name='External ID')),
                ('name', models.CharField(help_text='Name of the taxSegment.', max_length=250, verbose_name='Name')),
                ('code', models.CharField(help_text='Code of the taxSegment.', max_length=250, verbose_name='Code')),
                ('macrosegment', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='artd_customer.macrotaxsegment')),
            ],
            options={
                'verbose_name': 'TaxSegment',
                'verbose_name_plural': 'TaxSegments',
            },
        ),
        migrations.AddField(
            model_name='customer',
            name='tax_segment',
            field=models.ForeignKey(blank=True, help_text='Tax segment.', null=True, on_delete=django.db.models.deletion.CASCADE, to='artd_customer.taxsegment', verbose_name='Tax segment'),
        ),
    ]
