# Generated by Django 3.1 on 2020-10-06 10:59

import api.models
from django.conf import settings
import django.contrib.postgres.fields
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('api', '0060_delete_order'),
    ]

    operations = [
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('selecteds', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(choices=[('IN', 'Insurance'), ('SR', 'Signature Release Required'), ('WG', 'White Glove Delivery'), ('WC', 'Will-Call Pick Up'), ('GS', 'Ground Shipping'), ('ES', 'Expedited Shipping')], max_length=2), default=api.models.Order.default_selecteds, size=6)),
                ('quantity', models.IntegerField(default=1)),
                ('ordered_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('payment_status', models.CharField(choices=[('paid', 'Paid'), ('unpaid', 'Unpaid')], max_length=6)),
                ('forecasted_arrival', models.DateTimeField(default=None, null=True)),
                ('tracking_url', models.URLField(default=None, null=True)),
                ('delivery_address', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.PROTECT, to='api.address')),
                ('rug', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.rug')),
                ('rug_variation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.rugvariation')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_query_name='cart_items', to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
