# Generated by Django 3.2.5 on 2021-07-17 16:39

from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Author",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name="Category",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name="Book",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("external_id", models.CharField(max_length=15, unique=True)),
                ("title", models.CharField(max_length=300)),
                ("published_date", models.CharField(max_length=4)),
                ("average_rating", models.IntegerField()),
                ("ratings_count", models.IntegerField()),
                ("thumbnail", models.CharField(max_length=1000)),
                ("authors", models.ManyToManyField(to="booksapp.Author")),
                ("categories", models.ManyToManyField(to="booksapp.Category")),
            ],
        ),
    ]
