# Generated by Django 3.0.6 on 2020-05-10 11:35

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='BookInfo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('google_id', models.CharField(max_length=50, unique=True)),
                ('title', models.CharField(max_length=150)),
                ('authors', models.CharField(blank=True, max_length=300)),
                ('description', models.TextField(blank=True, max_length=2000)),
                ('pageCount', models.IntegerField(blank=True, null=True)),
                ('small_pic_url', models.URLField(blank=True, max_length=1000)),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30)),
                ('profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tags', to='accounts.Profile')),
            ],
        ),
        migrations.CreateModel(
            name='Shelf',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=150)),
                ('is_custom', models.BooleanField(default=True)),
                ('profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='shelves', to='accounts.Profile')),
            ],
        ),
        migrations.CreateModel(
            name='ProfileBookInfo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('time', models.DateTimeField()),
                ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='profile_books', to='book.BookInfo')),
                ('profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='profile_books', to='accounts.Profile')),
                ('shelf', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='profile_books', to='book.Shelf')),
                ('tags', models.ManyToManyField(related_name='profile_book', to='book.Tag')),
            ],
        ),
    ]
