# Generated by Django 5.0.1 on 2024-02-14 11:09

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


class Migration(migrations.Migration):
    dependencies = [
        ("artd_customer", "0001_initial"),
    ]

    operations = [
        migrations.CreateModel(
            name="CustomerGroup",
            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",
                    ),
                ),
                (
                    "group_code",
                    models.SlugField(
                        help_text="Customer code",
                        unique=True,
                        verbose_name="Customer code",
                    ),
                ),
                (
                    "group_name",
                    models.CharField(
                        help_text="Customer group name",
                        max_length=100,
                        verbose_name="Customer group name",
                    ),
                ),
                (
                    "group_description",
                    models.TextField(
                        blank=True,
                        help_text="Customer group description",
                        null=True,
                        verbose_name="Customer group description",
                    ),
                ),
            ],
            options={
                "verbose_name": "Customer Group",
                "verbose_name_plural": "Customer Groups",
            },
        ),
        migrations.AddField(
            model_name="customer",
            name="customer_group",
            field=models.ForeignKey(
                blank=True,
                help_text="Customer group.",
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to="artd_customer.customergroup",
                verbose_name="Customer group",
            ),
        ),
        migrations.CreateModel(
            name="CustomerGroupChangeLog",
            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",
                    ),
                ),
                (
                    "customer",
                    models.ForeignKey(
                        help_text="Customer",
                        on_delete=django.db.models.deletion.CASCADE,
                        to="artd_customer.customer",
                        verbose_name="Customer",
                    ),
                ),
                (
                    "new_group",
                    models.ForeignKey(
                        help_text="New group",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="new_group",
                        to="artd_customer.customergroup",
                        verbose_name="New group",
                    ),
                ),
                (
                    "old_group",
                    models.ForeignKey(
                        help_text="Old group",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="old_group",
                        to="artd_customer.customergroup",
                        verbose_name="Old group",
                    ),
                ),
            ],
            options={
                "verbose_name": "Customer Group Change Log",
                "verbose_name_plural": "Customer Group Change Logs",
            },
        ),
    ]
