# Generated by Django 4.2.5 on 2026-01-23 06:31

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


class Migration(migrations.Migration):
    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("supplier", "__first__"),
        ("customer", "0002_customer_is_primary_customer_lead_and_more"),
    ]

    operations = [
        migrations.CreateModel(
            name="OtherImage",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True, null=True)),
                ("updated_at", models.DateTimeField(auto_now=True, null=True)),
                ("deleted_at", models.DateTimeField(blank=True, null=True)),
                (
                    "other_images",
                    models.ImageField(upload_to="product_images/other_images/"),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="Product",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True, null=True)),
                ("updated_at", models.DateTimeField(auto_now=True, null=True)),
                ("deleted_at", models.DateTimeField(blank=True, null=True)),
                ("uid", models.TextField(null=True)),
                ("sku", models.CharField(max_length=50, null=True)),
                (
                    "product_type",
                    models.CharField(
                        choices=[
                            ("used", "Used"),
                            ("new", "In Stock"),
                            ("non_stock", "Non Stock"),
                            ("special_configuration", "Special Configuration"),
                        ],
                        max_length=255,
                    ),
                ),
                ("product_name", models.CharField(max_length=255, null=True)),
                ("product_description", models.TextField()),
                ("product_specification_contents", models.TextField()),
                (
                    "product_image_main",
                    models.ImageField(upload_to="product_images/main_images/"),
                ),
                ("product_price", models.DecimalField(decimal_places=2, max_digits=10)),
                (
                    "specification_pdf",
                    models.FileField(upload_to="specification_pdfs/"),
                ),
                ("is_product", models.PositiveSmallIntegerField(default=0)),
                ("is_active", models.BooleanField(default=True)),
                (
                    "product_details_pdf",
                    models.FileField(
                        blank=True, null=True, upload_to="product_datils_pdfs/"
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="ProductCategory",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True, null=True)),
                ("updated_at", models.DateTimeField(auto_now=True, null=True)),
                ("deleted_at", models.DateTimeField(blank=True, null=True)),
                ("category_name", models.CharField(max_length=255)),
                ("allow_price_edit", models.BooleanField(default=False)),
                ("is_active", models.BooleanField(default=True)),
                ("soft_deleted", models.BooleanField(default=False)),
            ],
            options={
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="SerialNumber",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True, null=True)),
                ("updated_at", models.DateTimeField(auto_now=True, null=True)),
                ("deleted_at", models.DateTimeField(blank=True, null=True)),
                (
                    "serial_number",
                    models.CharField(blank=True, max_length=255, null=True),
                ),
                ("Arrival_ETA_date", models.DateField(null=True)),
                ("arrived_date", models.DateField(null=True)),
                ("is_active", models.BooleanField(default=True)),
                (
                    "status",
                    models.PositiveSmallIntegerField(
                        choices=[(0, "Open"), (1, "Unallocated"), (2, "Allocated")],
                        default=0,
                        null=True,
                    ),
                ),
                (
                    "tracking_status",
                    models.PositiveSmallIntegerField(
                        choices=[
                            (0, "Ordered"),
                            (1, "Shipped"),
                            (2, "Watered"),
                            (3, "Arrived"),
                            (4, "Booked For Install"),
                            (5, "Installed"),
                            (12, "Ready For Install"),
                        ],
                        default=0,
                        null=True,
                    ),
                ),
                ("bill_identifier", models.IntegerField(null=True)),
                (
                    "bill",
                    models.ForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="supplier.supplier_bill",
                    ),
                ),
                (
                    "created_by",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="%(class)s_created",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
                (
                    "customer",
                    models.ForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="customer.customer",
                    ),
                ),
                (
                    "deleted_by",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="%(class)s_deleted",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
    ]
