# Generated by Django 4.1.9 on 2023-08-10 18:36

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("documents", "0011_book_woblink_id"),
        ("depot", "0002_legimibookpublish_legimichunkpublish"),
    ]

    operations = [
        migrations.CreateModel(
            name="Shop",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "shop",
                    models.CharField(
                        choices=[("legimi", "Legimi"), ("woblink", "Woblink")],
                        max_length=32,
                    ),
                ),
                ("username", models.CharField(max_length=255)),
                ("password", models.CharField(max_length=255)),
            ],
        ),
        migrations.RenameModel(
            old_name="LegimiBookPublish",
            new_name="ShopBookPublish",
        ),
        migrations.RenameModel(
            old_name="LegimiChunkPublish",
            new_name="ShopChunkPublish",
        ),
        migrations.CreateModel(
            name="PriceLevel",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("min_pages", models.IntegerField(blank=True, null=True)),
                ("min_words", models.IntegerField(blank=True, null=True)),
                ("price", models.IntegerField()),
                (
                    "shop",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE, to="depot.shop"
                    ),
                ),
            ],
            options={
                "ordering": ("price",),
            },
        ),
        migrations.CreateModel(
            name="MediaInsertText",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("ordering", models.IntegerField()),
                ("text", models.TextField()),
                (
                    "shop",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE, to="depot.shop"
                    ),
                ),
            ],
            options={
                "ordering": ("ordering",),
            },
        ),
    ]
