# Generated by Django 4.2.4 on 2023-09-11 20:42

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


class Migration(migrations.Migration):
    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Toot",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("text", models.TextField(max_length=4096)),
                ("url", models.URLField(blank=True, editable=False, null=True)),
                (
                    "mastodon_id",
                    models.BigIntegerField(blank=True, editable=False, null=True),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                (
                    "response",
                    models.TextField(
                        blank=True, null=True, verbose_name="Mastodon.py Response"
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="TootFile",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "title",
                    models.CharField(blank=True, max_length=128, verbose_name="Title"),
                ),
                (
                    "file",
                    models.FileField(
                        upload_to=django_toots.models._upload_path, verbose_name="File"
                    ),
                ),
                (
                    "delete_after_upload",
                    models.BooleanField(
                        default=False, verbose_name="Delete the file after upload"
                    ),
                ),
                (
                    "created_at",
                    models.DateTimeField(auto_now_add=True, verbose_name="Created at"),
                ),
                (
                    "expires_at",
                    models.DateTimeField(
                        blank=True, null=True, verbose_name="Expires at"
                    ),
                ),
                (
                    "media_id_string",
                    models.CharField(
                        blank=True, editable=False, max_length=32, null=True
                    ),
                ),
                (
                    "response",
                    models.TextField(
                        blank=True, null=True, verbose_name="Mastodon.py Response"
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="TootPublication",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("publish", models.BooleanField(default=False)),
                (
                    "toot",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="django_toots.toot",
                    ),
                ),
            ],
        ),
        migrations.AddField(
            model_name="toot",
            name="files",
            field=models.ManyToManyField(blank=True, to="django_toots.tootfile"),
        ),
    ]
