# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-05-04 16:08
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('authors_app', '0001_initial'),
        ('users_app', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Book',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
                ('isbn', models.PositiveIntegerField()),
                ('pub_date', models.DateField()),
                ('cover_photo', models.ImageField(upload_to='')),
                ('description', models.TextField()),
                ('rating', models.FloatField()),
                ('genre', models.CharField(choices=[('FA', 'Fantasy'), ('FI', 'Fiction'), ('CH', 'Children'), ('SF', 'Sci-Fiction'), ('RO', 'Romance'), ('ME', 'Memoirs'), ('SH', 'Self-Help'), ('HI', 'History'), ('RE', 'Religion'), ('BI', 'Biography')], max_length=2)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='authors_app.Author')),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('comment_text', models.TextField()),
                ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='books_app.Book')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='users_app.User')),
            ],
        ),
    ]
