# Generated by Django 3.0 on 2020-02-13 14:55

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


class Migration(migrations.Migration):

    dependencies = [
        ('library', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='FilterLetter',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('filter_letter', models.CharField(max_length=1, verbose_name='Фільтрування за літерою:')),
            ],
            options={
                'verbose_name': 'Літера',
                'verbose_name_plural': 'Літери',
                'ordering': ['filter_letter'],
            },
        ),
        migrations.RenameModel(
            old_name='SectionCategoy',
            new_name='SectionCategory',
        ),
        migrations.AlterModelOptions(
            name='author',
            options={'ordering': ['last_name'], 'verbose_name': 'Автор', 'verbose_name_plural': 'Автори'},
        ),
        migrations.AlterModelOptions(
            name='book',
            options={'ordering': ['name'], 'verbose_name': 'Підручник або книга', 'verbose_name_plural': 'Підручники або книги'},
        ),
        migrations.RemoveField(
            model_name='book',
            name='section_categoy',
        ),
        migrations.AddField(
            model_name='book',
            name='description',
            field=models.TextField(blank=True, verbose_name='Опис'),
        ),
        migrations.AddField(
            model_name='book',
            name='file_url',
            field=models.CharField(blank=True, max_length=255, verbose_name='Посилання на файл в інтернет'),
        ),
        migrations.AddField(
            model_name='book',
            name='is_cover_default',
            field=models.BooleanField(default=False, verbose_name='Стандартна обкладинка'),
        ),
        migrations.AddField(
            model_name='book',
            name='section_category',
            field=models.ManyToManyField(blank=True, related_name='section_category', to='library.SectionCategory'),
        ),
        migrations.AddField(
            model_name='book',
            name='subject',
            field=models.CharField(blank=True, max_length=255, verbose_name='Предмет'),
        ),
        migrations.AlterField(
            model_name='book',
            name='file',
            field=models.FileField(blank=True, upload_to=library.utilites.get_timestamp_path_book, verbose_name='Завантажити підручник або книгу'),
        ),
        migrations.AlterField(
            model_name='book',
            name='name',
            field=models.CharField(max_length=255, verbose_name='Назва підручника або книги'),
        ),
        migrations.AlterField(
            model_name='book',
            name='publishing_house',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='library.PublishingHouse', verbose_name='Видавництво'),
        ),
        migrations.AddField(
            model_name='book',
            name='filter_letter',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='library.FilterLetter', verbose_name='Фільтрування за літерою:'),
        ),
    ]
