# Generated by Django 2.2.7 on 2020-03-04 21:43

from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Author',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('full_name', models.CharField(max_length=255, verbose_name='Полное имя')),
            ],
            options={
                'verbose_name': 'Автор',
                'verbose_name_plural': 'Авторы',
                'ordering': ('full_name',),
            },
        ),
        migrations.CreateModel(
            name='Publisher',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Название')),
            ],
            options={
                'verbose_name': 'Издательство',
                'verbose_name_plural': 'Издательства',
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Название')),
                ('color', models.CharField(choices=[('bgm-white', 'White'), ('bgm-black', 'Black'), ('bgm-brown', 'Brown'), ('bgm-pink', 'Pink'), ('bgm-red', 'Red'), ('bgm-blue', 'Blue'), ('bgm-purple', 'Purple'), ('bgm-deeppurple', 'Deep purple'), ('bgm-lightblue', 'Light blue'), ('bgm-cyan', 'Cyan'), ('bgm-teal', 'Teal'), ('bgm-green', 'Green'), ('bgm-lightgreen', 'Light green'), ('bgm-lime', 'Lime'), ('bgm-yellow', 'Yellow'), ('bgm-amber', 'Amber'), ('bgm-orange', 'Orange'), ('bgm-deeporange', 'Deep orange'), ('bgm-gray', 'Gray'), ('bgm-bluegray', 'Blue gray'), ('bgm-indigo', 'Indigo')], default='bgm-gray', max_length=20, verbose_name='Цвет')),
            ],
            options={
                'verbose_name': 'Тег',
                'verbose_name_plural': 'Теги',
            },
        ),
        migrations.CreateModel(
            name='Book',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=500, verbose_name='Название')),
                ('description', models.TextField(blank=True, verbose_name='Описание')),
                ('cover', models.ImageField(blank=True, upload_to='library/covers', verbose_name='Обложка')),
                ('cover_thumbnail', models.ImageField(blank=True, upload_to='library/thumbnails', verbose_name='Превью')),
                ('year', models.PositiveIntegerField(verbose_name='Год издания')),
                ('page_count', models.PositiveSmallIntegerField(default=0, verbose_name='Количество страниц')),
                ('draft', models.BooleanField(default=False, verbose_name='Черновик')),
                ('created_date', models.DateTimeField(auto_now_add=True, verbose_name='Дата создания')),
                ('changed_date', models.DateTimeField(auto_now=True, verbose_name='Дата последнего изменения')),
                ('url', models.URLField(verbose_name='Ссылка для скачивания')),
                ('size', models.FloatField(help_text='Условный размер файла в мегабайтах', verbose_name='Размер файла')),
                ('format', models.PositiveSmallIntegerField(choices=[(0, 'PDF'), (1, 'DJVU')], default=0, verbose_name='Формат файла')),
                ('authors', models.ManyToManyField(to='library.Author', verbose_name='Авторы')),
                ('publishers', models.ManyToManyField(to='library.Publisher', verbose_name='Издательства')),
                ('tags', models.ManyToManyField(blank=True, to='library.Tag', verbose_name='Теги')),
            ],
            options={
                'verbose_name': 'Книга',
                'verbose_name_plural': 'Книги',
                'ordering': ('-id',),
            },
        ),
    ]
