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

from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Notification",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "notification_type",
                    models.CharField(
                        choices=[
                            ("property_report", "Property report"),
                            ("service_report", "Service report"),
                            ("producer_report", "Producer report"),
                            ("job_report", "Job report"),
                        ],
                        max_length=50,
                    ),
                ),
                (
                    "property_report_id",
                    models.PositiveIntegerField(blank=True, null=True),
                ),
                (
                    "service_report_id",
                    models.PositiveIntegerField(blank=True, null=True),
                ),
                (
                    "producer_report_id",
                    models.PositiveIntegerField(blank=True, null=True),
                ),
                ("job_report_id", models.PositiveIntegerField(blank=True, null=True)),
                ("title", models.CharField(max_length=255)),
                ("message", models.TextField(blank=True, null=True)),
                (
                    "status",
                    models.CharField(
                        choices=[
                            ("unread", "Unread"),
                            ("read", "Read"),
                            ("archived", "Archived"),
                        ],
                        default="unread",
                        max_length=20,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("read_at", models.DateTimeField(blank=True, null=True)),
            ],
            options={
                "ordering": ["-created_at"],
                "indexes": [
                    models.Index(
                        fields=["status"], name="notificatio_status_71d9cf_idx"
                    ),
                    models.Index(
                        fields=["-created_at"], name="notificatio_created_87dbca_idx"
                    ),
                ],
            },
        ),
    ]
