# -*- coding: utf-8 -*-
# Generated by Django 1.11.8 on 2018-01-01 23:45
from __future__ import unicode_literals

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


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')),
                ('first_name', models.CharField(max_length=30, verbose_name=b'First name')),
                ('last_name', models.CharField(max_length=40, verbose_name=b'Last name')),
                ('rank', models.IntegerField(default=0, verbose_name=b'Rank')),
            ],
            options={
                'verbose_name': 'Author',
                'verbose_name_plural': 'Authors',
            },
        ),
        migrations.CreateModel(
            name='Book',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100, verbose_name=b'Title')),
                ('publication_date', models.DateField(verbose_name=b'Publication date')),
                ('price', models.FloatField(verbose_name=b'Price')),
                ('authors', models.ManyToManyField(to='books.Author', verbose_name=b'Authors')),
            ],
            options={
                'verbose_name': 'Book',
                'verbose_name_plural': 'Books',
            },
        ),
        migrations.CreateModel(
            name='Publisher',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, verbose_name=b'Publisher name')),
                ('rank', models.IntegerField(default=0, verbose_name=b'Publisher rank')),
            ],
            options={
                'verbose_name': 'Publisher',
                'verbose_name_plural': 'Publishers',
            },
        ),
        migrations.AddField(
            model_name='book',
            name='publisher',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='books', to='books.Publisher', verbose_name=b'Publisher'),
        ),
    ]
