# Generated by Django 3.1.4 on 2020-12-28 05:48

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='BooksShelf',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('room', models.IntegerField(verbose_name='Room number')),
                ('position', models.IntegerField(verbose_name='Position')),
            ],
            options={
                'verbose_name': 'Books shelf',
                'verbose_name_plural': 'Books shelves',
                'ordering': ['room'],
            },
        ),
        migrations.CreateModel(
            name='Book',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255, verbose_name='Title')),
                ('published_at', models.DateTimeField(verbose_name='Published at')),
                ('shelf', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='shelf.booksshelf', verbose_name='Shelf')),
            ],
            options={
                'verbose_name': 'Book',
                'verbose_name_plural': 'Books',
                'ordering': ['-published_at'],
            },
        ),
    ]
