# Generated by Django 3.2.5 on 2021-10-23 11:37

import datetime
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Book',
            fields=[
                ('book_id', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=100)),
                ('year_of_publish', models.DateField(blank=True, null=True)),
                ('no_of_pages', models.IntegerField(blank=True, null=True)),
                ('genre', models.CharField(max_length=100)),
                ('price', models.FloatField()),
                ('author', models.CharField(max_length=100)),
                ('book_status', models.CharField(default='Pending', max_length=100)),
                ('cover_photo', models.ImageField(blank=True, null=True, upload_to='images')),
                ('book_type', models.CharField(default='Pending', max_length=100)),
                ('pdf', models.FileField(blank=True, default='images/not-available.png', null=True, upload_to='books')),
                ('audio', models.FileField(blank=True, default='images/not-available.png', null=True, upload_to='books')),
                ('summary', models.TextField(default='Not Available', max_length=500)),
                ('adult_mode', models.BooleanField(default=False)),
                ('book_mode', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='user.mode')),
            ],
        ),
        migrations.CreateModel(
            name='Quiz',
            fields=[
                ('quiz_id', models.AutoField(primary_key=True, serialize=False)),
                ('quiz_type', models.CharField(max_length=100)),
                ('quiz_question_statement', models.CharField(max_length=1000)),
                ('quiz_option_1', models.CharField(max_length=200)),
                ('quiz_option_2', models.CharField(max_length=200)),
                ('quiz_option_3', models.CharField(max_length=200)),
                ('quiz_option_4', models.CharField(max_length=200)),
                ('quiz_answer', models.CharField(default='', max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Voucher',
            fields=[
                ('voucher_id', models.AutoField(primary_key=True, serialize=False)),
                ('description', models.CharField(max_length=200)),
                ('credit', models.IntegerField()),
                ('code', models.CharField(default='', max_length=10)),
            ],
        ),
        migrations.CreateModel(
            name='Wishlist',
            fields=[
                ('wishlist_id', models.AutoField(primary_key=True, serialize=False)),
                ('wishlist_book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='admin_dashboard.book')),
                ('wishlist_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.user')),
            ],
        ),
        migrations.CreateModel(
            name='VoucherUser',
            fields=[
                ('voucher_user_id', models.AutoField(primary_key=True, serialize=False)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.user')),
                ('voucher', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='admin_dashboard.voucher')),
            ],
        ),
        migrations.CreateModel(
            name='Review',
            fields=[
                ('review_id', models.AutoField(primary_key=True, serialize=False)),
                ('review_text', models.TextField(default='', max_length=500)),
                ('review_date', models.DateField(default=datetime.datetime.now)),
                ('review_rate', models.IntegerField(default=0, validators=[django.core.validators.MaxValueValidator(5), django.core.validators.MinValueValidator(0)])),
                ('review_book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='admin_dashboard.book')),
                ('review_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.user')),
            ],
        ),
        migrations.CreateModel(
            name='QuizUser',
            fields=[
                ('quiz_user_id', models.AutoField(primary_key=True, serialize=False)),
                ('quiz_user_option', models.CharField(max_length=20)),
                ('quiz_user_quiz', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='admin_dashboard.quiz')),
                ('quiz_user_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.user')),
            ],
        ),
        migrations.CreateModel(
            name='QuizBook',
            fields=[
                ('quiz_book_id', models.AutoField(primary_key=True, serialize=False)),
                ('quiz_book_score', models.IntegerField()),
                ('quiz_book_book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='admin_dashboard.book')),
                ('quiz_book_quiz', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='admin_dashboard.quiz')),
            ],
        ),
        migrations.CreateModel(
            name='QuickNote',
            fields=[
                ('QuickNote_id', models.AutoField(primary_key=True, serialize=False)),
                ('QuickNote_page_number', models.IntegerField()),
                ('QuickNote_text', models.TextField(blank=True, max_length=200, null=True)),
                ('QuickNote_book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='admin_dashboard.book')),
                ('QuickNote_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.user')),
            ],
        ),
        migrations.CreateModel(
            name='Deal',
            fields=[
                ('deal_id', models.AutoField(primary_key=True, serialize=False)),
                ('deal_title', models.TextField(default='', max_length=500)),
                ('deal_valid_upto', models.DateField(default=datetime.datetime.now)),
                ('deal_percentage', models.FloatField(default=0)),
                ('deal_book', models.ManyToManyField(to='admin_dashboard.Book')),
            ],
        ),
        migrations.CreateModel(
            name='Cart',
            fields=[
                ('cart_id', models.AutoField(primary_key=True, serialize=False)),
                ('payment_status', models.CharField(blank=True, max_length=200, null=True)),
                ('cart_detail', models.CharField(blank=True, max_length=200, null=True)),
                ('cart_book', models.ManyToManyField(to='admin_dashboard.Book')),
                ('cart_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.user')),
            ],
        ),
        migrations.CreateModel(
            name='BookMark',
            fields=[
                ('bookmark_id', models.AutoField(primary_key=True, serialize=False)),
                ('bookmark_page_number', models.IntegerField()),
                ('bookmark_text', models.TextField(blank=True, max_length=200, null=True)),
                ('bookmark_book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='admin_dashboard.book')),
                ('bookmark_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.user')),
            ],
        ),
    ]
