# Generated by Django 5.1.2 on 2024-11-18 19:25

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


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Link",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("rel", models.TextField(help_text="relationship of link to subject")),
                ("href", models.TextField(help_text="uri of link")),
                (
                    "type",
                    models.TextField(
                        blank=True,
                        help_text="The media type of the dereferenced link. http://www.iana.org/assignments/media-types/media-types.xhtml",
                        null=True,
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="Subject",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("value", models.CharField(max_length=512, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name="LinkProperty",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        default="und",
                        help_text="must be a language code",
                        max_length=32,
                    ),
                ),
                ("value", models.TextField()),
                (
                    "link",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="fedj_webfinger.link",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="LinkTitle",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        default="und",
                        help_text="must be a language code",
                        max_length=32,
                    ),
                ),
                ("value", models.TextField()),
                (
                    "link",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="fedj_webfinger.link",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="Property",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.TextField(unique=True)),
                ("value", models.TextField(unique=True)),
                (
                    "subject",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="fedj_webfinger.subject",
                    ),
                ),
            ],
            options={
                "verbose_name_plural": "Properties",
            },
        ),
        migrations.AddField(
            model_name="link",
            name="subject",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name="links",
                to="fedj_webfinger.subject",
            ),
        ),
        migrations.CreateModel(
            name="Alias",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("value", models.TextField()),
                (
                    "subject",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="fedj_webfinger.subject",
                    ),
                ),
            ],
            options={
                "verbose_name_plural": "Aliases",
            },
        ),
    ]
