# Generated by Django 3.1.7 on 2021-03-27 14:00

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nazwa', models.CharField(default='book', max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='Book',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='Title', max_length=38)),
                ('authors', models.CharField(default='Anonymus', max_length=38)),
                ('published_date', models.DateField(blank=True, default=None, null=True)),
                ('average_rating', models.DecimalField(decimal_places=2, default=0, max_digits=3)),
                ('ratings_count', models.DecimalField(decimal_places=0, default=0, max_digits=5)),
                ('thumbnail', models.ImageField(blank=True, upload_to='covers/')),
                ('categories', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='books.category')),
            ],
        ),
    ]
