# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2017-04-26 13:56
from __future__ import unicode_literals

from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import model_utils.fields
import spargo.core.utils
import thumbnails.fields


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('banks', '0001_initial'),
        ('orders', '0005_auto_20170425_2025'),
    ]

    operations = [
        migrations.CreateModel(
            name='Payment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sender', models.CharField(max_length=50)),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False)),
                ('status', models.PositiveSmallIntegerField(choices=[(1, b'New'), (2, b'Accepted'), (3, b'Rejected')], default=1)),
                ('photo', thumbnails.fields.ImageField(blank=True, default=b'', upload_to=spargo.core.utils.FilenameGenerator(prefix=b'payment-photo'))),
                ('notes', models.TextField(blank=True, default=b'')),
                ('bank', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='payments', to='banks.Bank')),
                ('correction_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='order',
            name='deliver_type',
            field=models.PositiveSmallIntegerField(choices=[(1, b'Spargo Kurir'), (2, b'JNE'), (3, b'JNT Express')], default=1),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='order',
            name='delivery_fee',
            field=models.FloatField(default=0, validators=[django.core.validators.MinValueValidator(0)]),
        ),
        migrations.AddField(
            model_name='order',
            name='installation_fee',
            field=models.FloatField(default=0, validators=[django.core.validators.MinValueValidator(0)]),
        ),
        migrations.AddField(
            model_name='order',
            name='region',
            field=models.CharField(blank=True, max_length=50, null=True),
        ),
        migrations.AddField(
            model_name='order',
            name='with_installation',
            field=models.BooleanField(default=True, verbose_name=b'active'),
        ),
        migrations.AddField(
            model_name='payment',
            name='order',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='payments', to='orders.Order'),
        ),
    ]
