# -*- coding: utf-8 -*-
# Generated by Django 1.11.8 on 2017-12-28 23:27
from __future__ import unicode_literals

import datetime
from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('product_app', '0012_auto_20171229_1224'),
    ]

    operations = [
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(choices=[('SC', 'In Shoppingcart'), ('SM', 'Submitted'), ('PD', 'Paid'), ('PS', 'Processing'), ('SD', 'Shipped'), ('DD', 'Delivered')], default='SC', max_length=2)),
                ('submitted_date', models.DateTimeField(blank=True, null=True)),
                ('date', models.DateTimeField(blank=True, default=datetime.datetime.now, null=True)),
                ('quantity', models.PositiveIntegerField(default=0)),
                ('GST', models.DecimalField(decimal_places=2, max_digits=8)),
                ('total_price', models.DecimalField(decimal_places=2, max_digits=10)),
                ('recipient', models.CharField(blank=True, max_length=256, null=True)),
                ('phone_number', models.CharField(blank=True, max_length=16, validators=[django.core.validators.RegexValidator(message="Phone number must be entered in the format: '+999999999'. Up to 15 digits allowed.", regex='^\\+?\\d{8,16}$')])),
                ('street_line1', models.CharField(blank=True, max_length=100, verbose_name='Address 1')),
                ('street_line2', models.CharField(blank=True, max_length=100, verbose_name='Address 2')),
                ('zipcode', models.CharField(blank=True, max_length=5, verbose_name='Zip Code')),
                ('city', models.CharField(blank=True, max_length=100, verbose_name='City')),
                ('state', models.CharField(blank=True, max_length=100, verbose_name='State')),
                ('account', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='OrderItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('price', models.DecimalField(decimal_places=2, max_digits=8)),
                ('quantity', models.PositiveIntegerField(default=0)),
                ('cart', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='order_app.Order')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product_app.Hat')),
            ],
        ),
    ]
