# Generated by Django 4.1.5 on 2023-03-06 16:31

from django.db import migrations, models
import django.db.models.deletion
import django_extensions.db.fields


class Migration(migrations.Migration):

    dependencies = [
        ("books", "0003_book_cover"),
    ]

    operations = [
        migrations.RemoveField(
            model_name="book",
            name="author_name",
        ),
        migrations.RemoveField(
            model_name="book",
            name="author_openlibrary_id",
        ),
        migrations.AddField(
            model_name="author",
            name="headshot",
            field=models.ImageField(
                blank=True, null=True, upload_to="books/authors/"
            ),
        ),
        migrations.CreateModel(
            name="Page",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created",
                    django_extensions.db.fields.CreationDateTimeField(
                        auto_now_add=True, verbose_name="created"
                    ),
                ),
                (
                    "modified",
                    django_extensions.db.fields.ModificationDateTimeField(
                        auto_now=True, verbose_name="modified"
                    ),
                ),
                ("number", models.IntegerField()),
                ("start_time", models.DateTimeField()),
                ("duration_seconds", models.IntegerField()),
                (
                    "book",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="books.book",
                    ),
                ),
            ],
            options={
                "unique_together": {("book", "number")},
            },
        ),
    ]
