# Generated by Django 4.0.6 on 2022-07-21 07:52

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


class Migration(migrations.Migration):
    initial = True

    dependencies = [
        ("episode", "0010_pbsmmepisodeasset_images_json"),
        ("season", "0010_pbsmmseason_images_json_pbsmmseasonasset_images_json"),
        ("show", "0005_pbsmmshow_images_json_pbsmmshowasset_images_json_and_more"),
        ("special", "0008_pbsmmspecialasset_images_json_and_more"),
    ]

    operations = [
        migrations.CreateModel(
            name="Asset",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "date_created",
                    models.DateTimeField(
                        auto_now_add=True,
                        help_text="Not set by API",
                        verbose_name="Created On",
                    ),
                ),
                (
                    "date_last_api_update",
                    models.DateTimeField(
                        help_text="Not set by API",
                        null=True,
                        verbose_name="Last API Retrieval",
                    ),
                ),
                (
                    "ingest_on_save",
                    models.BooleanField(
                        default=False,
                        help_text=(
                            "If true, then will update values from the PBSMM API on"
                            " save()"
                        ),
                        verbose_name="Ingest on Save",
                    ),
                ),
                (
                    "last_api_status",
                    models.PositiveIntegerField(
                        blank=True, null=True, verbose_name="Last API Status"
                    ),
                ),
                (
                    "json",
                    models.JSONField(
                        blank=True,
                        help_text="This is the last JSON uploaded.",
                        null=True,
                        verbose_name="JSON",
                    ),
                ),
                (
                    "object_id",
                    models.UUIDField(
                        blank=True, null=True, unique=True, verbose_name="Object ID"
                    ),
                ),
                (
                    "api_endpoint",
                    models.URLField(
                        blank=True,
                        help_text="Endpoint to original record from the API",
                        null=True,
                        verbose_name="Link to API Record",
                    ),
                ),
                (
                    "title",
                    models.CharField(
                        blank=True, max_length=200, null=True, verbose_name="Title"
                    ),
                ),
                (
                    "title_sortable",
                    models.CharField(
                        blank=True,
                        max_length=200,
                        null=True,
                        verbose_name="Sortable Title",
                    ),
                ),
                (
                    "slug",
                    models.SlugField(max_length=200, unique=True, verbose_name="Slug"),
                ),
                ("description_long", models.TextField(verbose_name="Long Description")),
                (
                    "description_short",
                    models.TextField(verbose_name="Short Description"),
                ),
                (
                    "updated_at",
                    models.DateTimeField(
                        blank=True,
                        help_text="API record modified date",
                        null=True,
                        verbose_name="Updated At",
                    ),
                ),
                (
                    "images",
                    models.JSONField(
                        blank=True,
                        help_text="JSON serialized field",
                        null=True,
                        verbose_name="Images",
                    ),
                ),
                (
                    "images_json",
                    models.JSONField(
                        blank=True, help_text="JSON serialized field", null=True
                    ),
                ),
                (
                    "funder_message",
                    models.TextField(
                        blank=True, null=True, verbose_name="Funder Message"
                    ),
                ),
                (
                    "is_excluded_from_dfp",
                    models.BooleanField(
                        default=False, verbose_name="Is excluded from DFP"
                    ),
                ),
                (
                    "can_embed_player",
                    models.BooleanField(default=False, verbose_name="Can Embed Player"),
                ),
                (
                    "links",
                    models.JSONField(
                        blank=True,
                        help_text="JSON serialized field",
                        null=True,
                        verbose_name="Links",
                    ),
                ),
                (
                    "platforms",
                    models.JSONField(
                        blank=True,
                        help_text="JSON serialized field",
                        null=True,
                        verbose_name="Platforms",
                    ),
                ),
                (
                    "windows",
                    models.JSONField(
                        blank=True,
                        help_text="JSON serialized field",
                        null=True,
                        verbose_name="Windows",
                    ),
                ),
                (
                    "geo_profile",
                    models.JSONField(
                        blank=True,
                        help_text="JSON serialized field",
                        null=True,
                        verbose_name="Geo Profile",
                    ),
                ),
                (
                    "language",
                    models.CharField(
                        blank=True, max_length=10, null=True, verbose_name="Language"
                    ),
                ),
                (
                    "legacy_tp_media_id",
                    models.BigIntegerField(
                        blank=True,
                        help_text="(Legacy TP Media ID)",
                        null=True,
                        unique=True,
                        verbose_name="COVE ID",
                    ),
                ),
                (
                    "availability",
                    models.JSONField(
                        blank=True,
                        help_text="JSON serialized Field",
                        null=True,
                        verbose_name="Availability",
                    ),
                ),
                (
                    "duration",
                    models.IntegerField(
                        blank=True,
                        help_text="(in seconds)",
                        null=True,
                        verbose_name="Duration",
                    ),
                ),
                (
                    "object_type",
                    models.CharField(
                        blank=True, max_length=40, null=True, verbose_name="Object Type"
                    ),
                ),
                (
                    "has_captions",
                    models.BooleanField(default=False, verbose_name="Has Captions"),
                ),
                (
                    "tags",
                    models.JSONField(
                        blank=True,
                        help_text="JSON serialized field",
                        null=True,
                        verbose_name="Tags",
                    ),
                ),
                (
                    "player_code",
                    models.TextField(blank=True, null=True, verbose_name="Player Code"),
                ),
                (
                    "episode",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="assets",
                        to="episode.pbsmmepisode",
                    ),
                ),
                (
                    "season",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="assets",
                        to="season.pbsmmseason",
                    ),
                ),
                (
                    "show",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="assets",
                        to="show.pbsmmshow",
                    ),
                ),
                (
                    "special",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="assets",
                        to="special.pbsmmspecial",
                    ),
                ),
            ],
            options={
                "db_table": "pbsmm_asset",
                "verbose_name": "PBS MM Asset",
                "verbose_name_plural": "PBS MM Assets",
            },
        ),
    ]
