# Generated by Django 5.1.2 on 2024-11-10 07:26

import django.db.models.deletion
import wagtail.models.media
import wagtail.search.index
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("cast", "0059_add_subtitle"),
        ("wagtailcore", "0094_alter_page_locale"),
    ]

    operations = [
        migrations.CreateModel(
            name="Transcript",
            fields=[
                ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                (
                    "podlove",
                    models.FileField(
                        blank=True,
                        help_text="The transcript format for the Podlove Web Player",
                        null=True,
                        upload_to="cast_transcript/",
                        verbose_name="Podlove Transcript",
                    ),
                ),
                (
                    "vtt",
                    models.FileField(
                        blank=True,
                        help_text="The WebVTT format for feed / podcatchers",
                        null=True,
                        upload_to="cast_transcript/",
                        verbose_name="WebVTT Transcript",
                    ),
                ),
                (
                    "dote",
                    models.FileField(
                        blank=True,
                        help_text="The DOTe json format for feed / podcatchers",
                        null=True,
                        upload_to="cast_transcript/",
                        verbose_name="DOTe Transcript",
                    ),
                ),
                (
                    "audio",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE, related_name="transcript", to="cast.audio"
                    ),
                ),
                (
                    "collection",
                    models.ForeignKey(
                        default=wagtail.models.media.get_root_collection_id,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="wagtailcore.collection",
                        verbose_name="collection",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
            bases=(wagtail.search.index.Indexed, models.Model),
        ),
    ]
