# Generated by Django 4.2.9 on 2024-03-26 02:53

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


class Migration(migrations.Migration):
    dependencies = [
        ("aircox", "0025_sound_is_removed_alter_sound_is_downloadable_and_more"),
    ]

    operations = [
        migrations.AlterModelOptions(
            name="sound",
            options={"verbose_name": "Sound file", "verbose_name_plural": "Sound files"},
        ),
        migrations.RemoveField(
            model_name="sound",
            name="episode",
        ),
        migrations.RemoveField(
            model_name="sound",
            name="position",
        ),
        migrations.RemoveField(
            model_name="sound",
            name="type",
        ),
        migrations.AddField(
            model_name="sound",
            name="broadcast",
            field=models.BooleanField(
                default=False, help_text="The sound is broadcasted on air", verbose_name="Broadcast"
            ),
        ),
        migrations.AddField(
            model_name="sound",
            name="description",
            field=models.TextField(blank=True, default="", max_length=256, verbose_name="description"),
        ),
        migrations.AlterField(
            model_name="sound",
            name="file",
            field=models.FileField(
                db_index=True, max_length=256, upload_to=aircox.models.file.File._upload_to, verbose_name="file"
            ),
        ),
        migrations.AlterField(
            model_name="sound",
            name="is_downloadable",
            field=models.BooleanField(
                default=False, help_text="sound can be downloaded by visitors", verbose_name="downloadable"
            ),
        ),
        migrations.AlterField(
            model_name="sound",
            name="is_public",
            field=models.BooleanField(default=False, help_text="file is publicly accessible", verbose_name="public"),
        ),
        migrations.AlterField(
            model_name="sound",
            name="is_removed",
            field=models.BooleanField(
                db_index=True, default=False, help_text="file has been removed from server", verbose_name="removed"
            ),
        ),
        migrations.AlterField(
            model_name="sound",
            name="name",
            field=models.CharField(db_index=True, max_length=64, verbose_name="name"),
        ),
        migrations.AlterField(
            model_name="sound",
            name="program",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to="aircox.program",
                verbose_name="Program",
            ),
        ),
        migrations.CreateModel(
            name="EpisodeSound",
            fields=[
                ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                (
                    "position",
                    models.PositiveSmallIntegerField(
                        default=0, help_text="position in the playlist", verbose_name="order"
                    ),
                ),
                (
                    "broadcast",
                    models.BooleanField(
                        blank=None, help_text="The sound is broadcasted on air", verbose_name="Broadcast"
                    ),
                ),
                ("episode", models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="aircox.episode")),
                ("sound", models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="aircox.sound")),
            ],
            options={
                "verbose_name": "Episode Sound",
                "verbose_name_plural": "Episode Sounds",
            },
        ),
    ]
