# Generated by Django 5.2 on 2026-04-26 10:36

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("city", "0001_initial"),
    ]

    operations = [
        migrations.CreateModel(
            name="ProductsReview",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("is_active", models.BooleanField(default=True)),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "review_star",
                    models.PositiveIntegerField(
                        blank=True,
                        validators=[
                            django.core.validators.MinValueValidator(1),
                            django.core.validators.MaxValueValidator(5),
                        ],
                    ),
                ),
                ("message", models.TextField()),
                (
                    "review_image",
                    models.ImageField(
                        blank=True, null=True, upload_to="review_images/product"
                    ),
                ),
                ("is_flagged_review", models.BooleanField(blank=True, default=False)),
            ],
            options={
                "verbose_name_plural": "products_reviews",
                "ordering": ["-created_at"],
            },
        ),
        migrations.CreateModel(
            name="ProducersProducts",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("is_active", models.BooleanField(default=True)),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                ("name", models.CharField(max_length=255)),
                ("country", models.CharField(blank=True, max_length=255, null=True)),
                ("state", models.CharField(blank=True, max_length=255, null=True)),
                ("description", models.TextField()),
                ("brand", models.CharField(max_length=255)),
                ("price", models.DecimalField(decimal_places=2, max_digits=20)),
                (
                    "products_type",
                    models.IntegerField(
                        choices=[(1, "Regular"), (2, "Flea")], default=1
                    ),
                ),
                ("is_flag", models.BooleanField(default=False)),
                ("contact_no", models.CharField(blank=True, max_length=15, null=True)),
                (
                    "city",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="city.city",
                    ),
                ),
            ],
            options={
                "verbose_name_plural": "Producers_products",
                "ordering": ["id"],
            },
        ),
    ]
