# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-04-26 07:05
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('catalog', '0011_book_price'),
    ]

    operations = [
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('stripe_cust_id', models.CharField(max_length=50)),
                ('book_qty', models.IntegerField(default=0)),
                ('Total_amt', models.IntegerField()),
                ('order_date', models.DateField(auto_now_add=True)),
                ('order_time', models.TimeField(auto_now_add=True)),
                ('status', models.CharField(choices=[('dispatched', 'dispatched'), ('shipped', 'Shipped'), ('delivered', 'Delivered')], max_length=30)),
                ('book_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='book_id', to='catalog.Book')),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cust', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='order_detail',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('qty', models.IntegerField(default=0)),
                ('price', models.IntegerField()),
                ('bk_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='bk_id', to='catalog.Book')),
                ('order_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='order_id', to='catalog.Order')),
            ],
        ),
    ]
