# Generated by Django 2.2.6 on 2019-11-16 20:49

import django.db.models.deletion
import wagtail.core.blocks
import wagtail.core.fields
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("core", "0002_auto_20191026_1704"),
        ("blog", "0008_moviereview"),
    ]

    operations = [
        migrations.CreateModel(
            name="CreationBase",
            fields=[
                (
                    "blogdetailpage_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="blog.BlogDetailPage",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
            bases=("blog.blogdetailpage",),
        ),
        migrations.CreateModel(
            name="CreativeHub",
            fields=[
                (
                    "bannerpage_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="core.BannerPage",
                    ),
                ),
            ],
            options={
                "verbose_name": "Creative Hub",
            },
            bases=("core.bannerpage",),
        ),
        migrations.CreateModel(
            name="VideoProjectPage",
            fields=[
                (
                    "creationbase_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="blog.CreationBase",
                    ),
                ),
                (
                    "video",
                    wagtail.core.fields.StreamField(
                        [
                            (
                                "youtube",
                                wagtail.core.blocks.StructBlock(
                                    [
                                        (
                                            "video_id",
                                            wagtail.core.blocks.RegexBlock(
                                                label="Video ID",
                                                max_length=11,
                                                min_length=11,
                                                regex="^[a-zA-Z0-9_-]{11}$",
                                                required=True,
                                            ),
                                        ),
                                        (
                                            "aspect_ratio",
                                            wagtail.core.blocks.ChoiceBlock(
                                                choices=[
                                                    ("1by1", "1:1"),
                                                    ("4by3", "4:3"),
                                                    ("16by9", "16:9"),
                                                    ("21by9", "21:9"),
                                                ],
                                                label="Aspect Ratio",
                                            ),
                                        ),
                                    ]
                                ),
                            )
                        ]
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
            bases=("blog.creationbase",),
        ),
    ]
