# Generated by Django 6.0.5 on 2026-05-31 10:53

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


class Migration(migrations.Migration):

    dependencies = [
        ("community", "0004_room_is_private_room_neighborhood_and_more"),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name="Deal",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("title", models.CharField(max_length=200)),
                ("description", models.TextField()),
                (
                    "original_price",
                    models.DecimalField(
                        blank=True, decimal_places=2, max_digits=10, null=True
                    ),
                ),
                (
                    "deal_price",
                    models.DecimalField(
                        blank=True, decimal_places=2, max_digits=10, null=True
                    ),
                ),
                (
                    "category",
                    models.CharField(
                        choices=[
                            ("food", "Food & Drinks"),
                            ("fashion", "Fashion"),
                            ("electronics", "Electronics"),
                            ("services", "Services"),
                            ("beauty", "Beauty & Health"),
                            ("other", "Other"),
                        ],
                        default="other",
                        max_length=30,
                    ),
                ),
                ("location", models.CharField(blank=True, max_length=200)),
                ("phone", models.CharField(blank=True, max_length=20)),
                ("image", models.ImageField(blank=True, null=True, upload_to="deals/")),
                ("expires_at", models.DateTimeField()),
                ("is_active", models.BooleanField(default=True)),
                ("views_count", models.PositiveIntegerField(default=0)),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                (
                    "seller",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="deals",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "ordering": ["-created_at"],
            },
        ),
        migrations.CreateModel(
            name="Event",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("title", models.CharField(max_length=200)),
                ("description", models.TextField()),
                (
                    "category",
                    models.CharField(
                        choices=[
                            ("music", "Music & Concert"),
                            ("sports", "Sports"),
                            ("church", "Church & Religious"),
                            ("business", "Business & Networking"),
                            ("community", "Community"),
                            ("education", "Education"),
                            ("other", "Other"),
                        ],
                        default="other",
                        max_length=30,
                    ),
                ),
                ("location", models.CharField(max_length=300)),
                ("neighborhood", models.CharField(blank=True, max_length=100)),
                ("starts_at", models.DateTimeField()),
                ("ends_at", models.DateTimeField(blank=True, null=True)),
                ("is_free", models.BooleanField(default=True)),
                (
                    "ticket_price",
                    models.DecimalField(
                        blank=True, decimal_places=2, max_digits=10, null=True
                    ),
                ),
                ("phone", models.CharField(blank=True, max_length=20)),
                (
                    "image",
                    models.ImageField(blank=True, null=True, upload_to="events/"),
                ),
                ("is_active", models.BooleanField(default=True)),
                ("rsvp_count", models.PositiveIntegerField(default=0)),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                (
                    "organizer",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="events",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "ordering": ["starts_at"],
            },
        ),
        migrations.CreateModel(
            name="KaziJob",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("title", models.CharField(max_length=200)),
                ("description", models.TextField()),
                (
                    "job_type",
                    models.CharField(
                        choices=[
                            ("casual", "Casual / Daily"),
                            ("part_time", "Part Time"),
                            ("full_time", "Full Time"),
                            ("contract", "Contract"),
                        ],
                        default="casual",
                        max_length=20,
                    ),
                ),
                (
                    "category",
                    models.CharField(
                        choices=[
                            ("domestic", "Domestic (Househelp, Cook)"),
                            ("construction", "Construction & Artisan"),
                            ("boda", "Boda Boda & Transport"),
                            ("tech", "Tech & IT"),
                            ("business", "Business & Sales"),
                            ("education", "Teaching & Tutoring"),
                            ("health", "Health & Medical"),
                            ("other", "Other"),
                        ],
                        default="other",
                        max_length=30,
                    ),
                ),
                ("location", models.CharField(blank=True, max_length=200)),
                ("neighborhood", models.CharField(blank=True, max_length=100)),
                ("pay", models.CharField(blank=True, max_length=100)),
                ("phone", models.CharField(blank=True, max_length=20)),
                ("is_active", models.BooleanField(default=True)),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("expires_at", models.DateTimeField(blank=True, null=True)),
                (
                    "poster",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="kazi_jobs",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "ordering": ["-created_at"],
            },
        ),
        migrations.CreateModel(
            name="LostFound",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "post_type",
                    models.CharField(
                        choices=[("lost", "Lost"), ("found", "Found")], max_length=10
                    ),
                ),
                (
                    "category",
                    models.CharField(
                        choices=[
                            ("person", "Person"),
                            ("pet", "Pet"),
                            ("item", "Item"),
                            ("vehicle", "Vehicle"),
                            ("document", "Document / ID"),
                            ("other", "Other"),
                        ],
                        default="item",
                        max_length=20,
                    ),
                ),
                ("title", models.CharField(max_length=200)),
                ("description", models.TextField()),
                ("location", models.CharField(blank=True, max_length=300)),
                ("neighborhood", models.CharField(blank=True, max_length=100)),
                ("phone", models.CharField(blank=True, max_length=20)),
                ("reward", models.CharField(blank=True, max_length=100)),
                (
                    "image",
                    models.ImageField(blank=True, null=True, upload_to="lostfound/"),
                ),
                ("is_resolved", models.BooleanField(default=False)),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                (
                    "poster",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="lost_found_posts",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "ordering": ["-created_at"],
            },
        ),
        migrations.CreateModel(
            name="EventRSVP",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                (
                    "event",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="rsvps",
                        to="community.event",
                    ),
                ),
                (
                    "user",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="rsvps",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "unique_together": {("event", "user")},
            },
        ),
    ]
