# Generated by Django 2.2.13 on 2020-06-17 12:05

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('payment_date', models.DateTimeField(blank=True, null=True, verbose_name='Payment Date')),
                ('created_date', models.DateTimeField(auto_now_add=True, verbose_name='Created Date')),
                ('status', models.IntegerField(choices=[(1, 'Submitted'), (2, 'Fulfilled'), (3, 'Cancelled'), (4, 'Refunded'), (5, 'Payment Failed')], default=1, verbose_name='Order Status')),
                ('status_note', models.CharField(blank=True, max_length=128, null=True, verbose_name='Order Status Note')),
                ('transaction_id', models.CharField(blank=True, max_length=256, null=True, verbose_name='Transaction ID')),
                ('email', models.EmailField(blank=True, max_length=128, null=True)),
                ('ip_address', models.GenericIPAddressField(blank=True, null=True, verbose_name='IP Address')),
                ('shipping_rate', models.DecimalField(blank=True, decimal_places=2, max_digits=12, null=True, verbose_name='Shipping Rate')),
            ],
        ),
        migrations.CreateModel(
            name='OrderItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity', models.IntegerField(default=1, verbose_name='Quantity')),
                ('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='items', to='orders.Order', verbose_name='Order')),
            ],
        ),
    ]
