# Generated by Django 5.1.11 on 2025-08-11 15:24

import django.contrib.postgres.fields
import django.utils.timezone
from django.db import migrations, models


class Migration(migrations.Migration):
    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="NotificationLog",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "channel",
                    models.CharField(
                        db_index=True,
                        help_text="PostgreSQL channel name",
                        max_length=100,
                    ),
                ),
                ("payload", models.JSONField(help_text="Notification payload data")),
                (
                    "created_at",
                    models.DateTimeField(
                        db_index=True,
                        default=django.utils.timezone.now,
                        help_text="When the notification was created",
                    ),
                ),
                (
                    "processed_by",
                    django.contrib.postgres.fields.ArrayField(
                        base_field=models.CharField(max_length=255),
                        default=list,
                        help_text="List of consumer IDs that have processed this notification",
                        size=None,
                    ),
                ),
            ],
            options={
                "ordering": ["id"],
                "indexes": [
                    models.Index(
                        fields=["channel", "id"], name="django_pgwa_channel_dfd4f2_idx"
                    )
                ],
            },
        ),
    ]
