# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-08-21 16:54
from __future__ import unicode_literals

from django.db import migrations, models
from django.conf import settings
import django.db.models.deletion
import spgateway.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='SpgatewayCustomerResponseBarcode',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Barcode_1', models.CharField(max_length=20, verbose_name='第一段條碼')),
                ('Barcode_2', models.CharField(max_length=20, verbose_name='第二段條碼')),
                ('Barcode_3', models.CharField(max_length=20, verbose_name='第三段條碼')),
            ],
        ),
        migrations.CreateModel(
            name='SpgatewayCustomerResponseCVS',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('CodeNo', models.CharField(max_length=30, verbose_name='繳費代碼')),
            ],
        ),
        migrations.CreateModel(
            name='SpgatewayCustomerResponseInfo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('MerchantID', models.CharField(max_length=15, verbose_name='商店代號')),
                ('Amt', models.IntegerField(max_length=10, verbose_name='交易金額')),
                ('TradeNo', models.CharField(max_length=20, verbose_name='智付通交易序號')),
                ('MerchantOrderNo', models.CharField(max_length=20, verbose_name='商店訂單編號')),
                ('PaymentType', models.CharField(max_length=10, verbose_name='支付方式')),
                ('ExpireDate', models.DateTimeField(verbose_name='繳費截止日期')),
            ],
            bases=(spgateway.models.SpgatewayResponseMixin, models.Model),
        ),
        migrations.CreateModel(
            name='SpgatewayCustomerResponseVACC',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('BankCode', models.CharField(max_length=10, verbose_name='金融機構代碼')),
                ('CodeNo', models.CharField(max_length=30, verbose_name='繳費代碼')),
                ('Info', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='spgateway.SpgatewayCustomerResponseInfo')),
            ],
        ),
        migrations.CreateModel(
            name='SpgatewayNotifyResponseATM',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('PayBankCode', models.CharField(max_length=10, verbose_name='付款人金融機構代碼')),
                ('PayerAccount5Code', models.CharField(max_length=5, verbose_name='付款人金融機構帳號末五碼')),
            ],
        ),
        migrations.CreateModel(
            name='SpgatewayNotifyResponseBarcode',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Barcode_1', models.CharField(max_length=20, verbose_name='第一段條碼')),
                ('Barcode_2', models.CharField(max_length=20, verbose_name='第二段條碼')),
                ('Barcode_3', models.CharField(max_length=20, verbose_name='第三段條碼')),
                ('PayStore', models.CharField(max_length=8, verbose_name='繳費超商')),
            ],
        ),
        migrations.CreateModel(
            name='SpgatewayNotifyResponseCredit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('RespondCode', models.CharField(max_length=5, verbose_name='金融機構回應碼')),
                ('Auth', models.CharField(max_length=6, verbose_name='授權碼')),
                ('Card6No', models.CharField(max_length=6, verbose_name='卡號前六碼')),
                ('Card4No', models.CharField(max_length=4, verbose_name='卡號末四碼')),
                ('Inst', models.IntegerField(max_length=10, verbose_name='分期-期別')),
                ('InstFirst', models.IntegerField(max_length=10, verbose_name='分期-首期金額')),
                ('InstEach', models.IntegerField(max_length=10, verbose_name='分期-每期金額')),
                ('ECI', models.CharField(max_length=2, verbose_name='ECI 值')),
                ('TokenUseStatus', models.IntegerField(max_length=1, verbose_name='信用卡快速結帳使用狀態')),
                ('RedAmt', models.IntegerField(max_length=5, null=True, verbose_name='紅利折抵後實際金額')),
            ],
        ),
        migrations.CreateModel(
            name='SpgatewayNotifyResponseCVS',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('CodeNo', models.CharField(max_length=30, verbose_name='繳費代碼')),
            ],
        ),
        migrations.CreateModel(
            name='SpgatewayNotifyResponseInfo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('MerchantID', models.CharField(max_length=15, verbose_name='商店代號')),
                ('Amt', models.IntegerField(max_length=10, verbose_name='交易金額')),
                ('TradeNo', models.CharField(max_length=20, verbose_name='智付通交易序號')),
                ('MerchantOrderNo', models.CharField(max_length=20, verbose_name='商店訂單編號')),
                ('PaymentType', models.CharField(max_length=10, verbose_name='支付方式')),
                ('RespondType', models.CharField(max_length=10, verbose_name='回傳格式')),
                ('PayTime', models.DateTimeField(verbose_name='支付完成時間')),
                ('IP', models.CharField(max_length=15, verbose_name='交易 IP')),
                ('EscrowBank', models.CharField(max_length=10, verbose_name='履保銀行')),
                ('Order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.SPGATEWAY_ORDERMODEL, verbose_name='訂單')),
            ],
            bases=(spgateway.models.SpgatewayResponseMixin, models.Model),
        ),
        migrations.AddField(
            model_name='spgatewaynotifyresponsecvs',
            name='Info',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='spgateway.SpgatewayNotifyResponseInfo'),
        ),
        migrations.AddField(
            model_name='spgatewaynotifyresponsecredit',
            name='Info',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='spgateway.SpgatewayNotifyResponseInfo'),
        ),
        migrations.AddField(
            model_name='spgatewaynotifyresponsebarcode',
            name='Info',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='spgateway.SpgatewayNotifyResponseInfo'),
        ),
        migrations.AddField(
            model_name='spgatewaynotifyresponseatm',
            name='Info',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='spgateway.SpgatewayNotifyResponseInfo'),
        ),
        migrations.AddField(
            model_name='spgatewaycustomerresponsecvs',
            name='Info',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='spgateway.SpgatewayCustomerResponseInfo'),
        ),
        migrations.AddField(
            model_name='spgatewaycustomerresponsebarcode',
            name='Info',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='spgateway.SpgatewayCustomerResponseInfo'),
        ),
    ]
