# Generated by Django 3.2.3 on 2021-09-02 02:52

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Users',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('phone', models.CharField(max_length=10, unique=True)),
                ('password', models.CharField(max_length=200)),
                ('status', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='Userprofile',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(default='avtar.jpg', upload_to='profile')),
                ('about', models.TextField(default='Please add something about you like which is your favourite blogger, favourite book etc.')),
                ('gender', models.CharField(default='Gender', max_length=100)),
                ('dob', models.DateField(null=True)),
                ('city', models.CharField(default='City', max_length=200)),
                ('state', models.CharField(default='State', max_length=200)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='bookstore.users')),
            ],
        ),
        migrations.CreateModel(
            name='BookDetail',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('book_name', models.CharField(max_length=200, unique=True)),
                ('book_author', models.CharField(max_length=200)),
                ('book_language', models.CharField(max_length=200)),
                ('book_pages', models.PositiveIntegerField()),
                ('book_price', models.PositiveIntegerField()),
                ('book_desc', models.TextField()),
                ('book_qty', models.IntegerField()),
                ('book_avail', models.BooleanField(default=True)),
                ('book_img', models.ImageField(default='mybook.png', upload_to='books')),
                ('cdate', models.DateTimeField(auto_now_add=True)),
                ('udate', models.DateTimeField(auto_now=True)),
                ('status', models.BooleanField(default=True)),
                ('book_seller', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='seller.seller')),
            ],
        ),
        migrations.CreateModel(
            name='Book_sold',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('solddate', models.DateTimeField(auto_now_add=True)),
                ('udate', models.DateTimeField(auto_now=True)),
                ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bookstore.bookdetail')),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bookstore.users')),
            ],
        ),
    ]
