# Generated by Django 3.1.4 on 2020-12-23 09:40

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    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=200)),
                ('last_name', models.CharField(max_length=200)),
                ('date_of_birth', models.DateField()),
                ('date_of_death', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='Book',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('published_date', models.DateField()),
                ('summary', models.TextField()),
                ('ISBN', models.CharField(max_length=20)),
                ('languege', models.CharField(choices=[('E', 'English'), ('S', 'Spanish'), ('F', 'French'), ('M', 'Mandarin'), ('G', 'Germany')], default='English', max_length=1)),
                ('genre', models.CharField(choices=[('T', 'Thriller'), ('R', 'Romantic'), ('A', 'Action'), ('C', 'Cooking'), ('E', 'Education')], default='Education', max_length=1)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Api.author')),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
