# Generated by Django 2.0.5 on 2018-06-15 03:39

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


class Migration(migrations.Migration):

    dependencies = [
        ('store', '0017_auto_20180615_0326'),
    ]

    operations = [
        migrations.CreateModel(
            name='OrderPayment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('payment_type', models.CharField(choices=[('CC', 'Credit Card'), ('CA', 'Checking Account'), ('PP', 'PayPal'), ('OT', 'Other')], max_length=2, verbose_name='Payment Type')),
                ('payment_date', models.DateField(verbose_name='Payment Date')),
                ('payment_amount', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='Payment Amount')),
                ('detail', models.CharField(max_length=200, verbose_name='Obs')),
            ],
        ),
        migrations.RenameField(
            model_name='order',
            old_name='total',
            new_name='order_total',
        ),
        migrations.AddField(
            model_name='order',
            name='total_paid',
            field=models.DecimalField(blank=True, decimal_places=2, max_digits=6, null=True, verbose_name='Paid Amount'),
        ),
        migrations.AddField(
            model_name='orderitem',
            name='delivered',
            field=models.BooleanField(default=False, verbose_name='Delivered?'),
        ),
        migrations.AddField(
            model_name='orderitem',
            name='delivered_date',
            field=models.DateField(blank=True, default=django.utils.timezone.now, null=True, verbose_name='Delivery Date'),
        ),
        migrations.AlterField(
            model_name='orderitem',
            name='order',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='store.Order'),
        ),
        migrations.AddField(
            model_name='orderpayment',
            name='order',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='store.Order'),
        ),
    ]
