# Generated by Django 3.2.7 on 2021-09-14 03:47

import django.db.models.deletion
import django.utils.timezone
import model_utils.fields
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="AudioContent",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created",
                    model_utils.fields.AutoCreatedField(
                        default=django.utils.timezone.now,
                        editable=False,
                        verbose_name="created",
                    ),
                ),
                (
                    "modified",
                    model_utils.fields.AutoLastModifiedField(
                        default=django.utils.timezone.now,
                        editable=False,
                        verbose_name="modified",
                    ),
                ),
                ("title", models.CharField(max_length=200, verbose_name="Заголовок")),
                (
                    "counter",
                    models.PositiveIntegerField(default=0, verbose_name="Счетчик"),
                ),
                (
                    "audio",
                    models.FileField(upload_to="audio", verbose_name="Аудиофайл"),
                ),
                ("bitrate", models.IntegerField(default=0, verbose_name="Битрейт")),
            ],
            options={
                "verbose_name": "Аудио",
                "verbose_name_plural": "Аудио",
            },
        ),
        migrations.CreateModel(
            name="Page",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created",
                    model_utils.fields.AutoCreatedField(
                        default=django.utils.timezone.now,
                        editable=False,
                        verbose_name="created",
                    ),
                ),
                (
                    "modified",
                    model_utils.fields.AutoLastModifiedField(
                        default=django.utils.timezone.now,
                        editable=False,
                        verbose_name="modified",
                    ),
                ),
                ("title", models.CharField(max_length=200, verbose_name="Заголовок")),
            ],
            options={
                "verbose_name": "Страница",
                "verbose_name_plural": "Страницы",
            },
        ),
        migrations.CreateModel(
            name="TextContent",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created",
                    model_utils.fields.AutoCreatedField(
                        default=django.utils.timezone.now,
                        editable=False,
                        verbose_name="created",
                    ),
                ),
                (
                    "modified",
                    model_utils.fields.AutoLastModifiedField(
                        default=django.utils.timezone.now,
                        editable=False,
                        verbose_name="modified",
                    ),
                ),
                ("title", models.CharField(max_length=200, verbose_name="Заголовок")),
                (
                    "counter",
                    models.PositiveIntegerField(default=0, verbose_name="Счетчик"),
                ),
                ("text", models.TextField(verbose_name="Текст")),
            ],
            options={
                "verbose_name": "Текст",
                "verbose_name_plural": "Текст",
            },
        ),
        migrations.CreateModel(
            name="VideoContent",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created",
                    model_utils.fields.AutoCreatedField(
                        default=django.utils.timezone.now,
                        editable=False,
                        verbose_name="created",
                    ),
                ),
                (
                    "modified",
                    model_utils.fields.AutoLastModifiedField(
                        default=django.utils.timezone.now,
                        editable=False,
                        verbose_name="modified",
                    ),
                ),
                ("title", models.CharField(max_length=200, verbose_name="Заголовок")),
                (
                    "counter",
                    models.PositiveIntegerField(default=0, verbose_name="Счетчик"),
                ),
                (
                    "video",
                    models.FileField(upload_to="video", verbose_name="Видеофайл"),
                ),
                (
                    "subtitle",
                    models.FileField(upload_to="subtitle", verbose_name="Субтитры"),
                ),
            ],
            options={
                "verbose_name": "Видео",
                "verbose_name_plural": "Видео",
            },
        ),
        migrations.CreateModel(
            name="PageBlock",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created",
                    model_utils.fields.AutoCreatedField(
                        default=django.utils.timezone.now,
                        editable=False,
                        verbose_name="created",
                    ),
                ),
                (
                    "modified",
                    model_utils.fields.AutoLastModifiedField(
                        default=django.utils.timezone.now,
                        editable=False,
                        verbose_name="modified",
                    ),
                ),
                (
                    "content_audio",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="main.audiocontent",
                        verbose_name="Аудио",
                    ),
                ),
                (
                    "content_text",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="main.textcontent",
                        verbose_name="Текст",
                    ),
                ),
                (
                    "content_video",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="main.videocontent",
                        verbose_name="Видео",
                    ),
                ),
                (
                    "page",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="main.page",
                        verbose_name="Страница",
                    ),
                ),
            ],
            options={
                "verbose_name": "Блок",
                "verbose_name_plural": "Блоки",
            },
        ),
    ]
