# Generated by Django 5.2.3 on 2025-07-09 10:20

from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("indieweb", "0007_alter_token_me"),
    ]

    operations = [
        migrations.CreateModel(
            name="Webmention",
            fields=[
                ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("source_url", models.URLField(db_index=True, max_length=500)),
                ("target_url", models.URLField(db_index=True, max_length=500)),
                (
                    "status",
                    models.CharField(
                        choices=[
                            ("pending", "Pending"),
                            ("verified", "Verified"),
                            ("failed", "Failed"),
                            ("spam", "Spam"),
                        ],
                        default="pending",
                        max_length=20,
                    ),
                ),
                ("author_name", models.CharField(blank=True, max_length=200)),
                ("author_url", models.URLField(blank=True)),
                ("author_photo", models.URLField(blank=True)),
                ("content", models.TextField(blank=True)),
                ("content_html", models.TextField(blank=True)),
                ("published", models.DateTimeField(blank=True, null=True)),
                (
                    "mention_type",
                    models.CharField(
                        choices=[("mention", "Mention"), ("like", "Like"), ("reply", "Reply"), ("repost", "Repost")],
                        default="mention",
                        max_length=20,
                    ),
                ),
                ("created", models.DateTimeField(auto_now_add=True)),
                ("modified", models.DateTimeField(auto_now=True)),
                ("verified_at", models.DateTimeField(blank=True, null=True)),
                ("spam_check_result", models.JSONField(blank=True, null=True)),
            ],
            options={
                "indexes": [
                    models.Index(fields=["target_url", "status"], name="indieweb_we_target__83e347_idx"),
                    models.Index(fields=["created"], name="indieweb_we_created_aea8d1_idx"),
                ],
                "unique_together": {("source_url", "target_url")},
            },
        ),
    ]
