# Generated by Django 3.1.1 on 2020-09-25 08:48

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('product', '0001_initial'),
        ('user', '0004_auto_20200923_0747'),
    ]

    operations = [
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_ordered', models.DateTimeField(blank=True, null=True)),
                ('date_shipped', models.DateTimeField(blank=True, null=True)),
                ('is_order_placed', models.BooleanField(default=False)),
                ('is_payment_done', models.BooleanField(default=False)),
                ('is_ready_for_shipping', models.BooleanField(default=False)),
                ('is_shipped', models.BooleanField(default=False)),
                ('is_cancelled', models.BooleanField(default=False)),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.customer')),
            ],
        ),
        migrations.CreateModel(
            name='Payment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(choices=[('C', 'Cash on Delivery'), ('N', 'Net Banking'), ('D', 'Debit/Credit Card')], max_length=1)),
                ('amount', models.IntegerField()),
                ('description', models.TextField(blank=True, null=True)),
                ('order', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='order.order')),
            ],
        ),
        migrations.CreateModel(
            name='OrderItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity', models.IntegerField()),
                ('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='order.order')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.product')),
                ('variant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.variant')),
            ],
        ),
    ]
