# Generated by Django 5.1 on 2025-04-08 02:16

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


class Migration(migrations.Migration):

    dependencies = [
        ("artd_customer", "0022_alter_customer_trade_name"),
        ("artd_partner", "0010_partner_signed_key"),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name="CustomerImportResult",
            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",
                    ),
                ),
                (
                    "processed",
                    models.BooleanField(
                        default=False, help_text="Processed", verbose_name="Processed"
                    ),
                ),
                (
                    "file",
                    models.FileField(
                        help_text="File",
                        upload_to="customer_imports/",
                        verbose_name="File",
                    ),
                ),
                (
                    "errors",
                    models.JSONField(
                        blank=True, help_text="Errors", null=True, verbose_name="Errors"
                    ),
                ),
                (
                    "created_by",
                    models.ForeignKey(
                        help_text="Created by",
                        on_delete=django.db.models.deletion.CASCADE,
                        to=settings.AUTH_USER_MODEL,
                        verbose_name="Created by",
                    ),
                ),
                (
                    "partner",
                    models.ForeignKey(
                        help_text="Partner",
                        on_delete=django.db.models.deletion.CASCADE,
                        to="artd_partner.partner",
                        verbose_name="Partner",
                    ),
                ),
            ],
            options={
                "verbose_name": "Customer Import Result",
                "verbose_name_plural": "Customer Import Results",
            },
        ),
    ]
