# Generated by Django 2.1.3 on 2018-11-25 09:40

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='AdmitadPostbackEvent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order_id', models.PositiveIntegerField(verbose_name='Order ID')),
                ('admitad_uid', models.CharField(max_length=64, verbose_name='Admitad UID')),
                ('campaign_code', models.CharField(max_length=64, verbose_name='Campain code')),
                ('payment_type', models.CharField(choices=[('Sale', 'Sale'), ('Lead', 'Lead')], max_length=4, verbose_name='Payment type')),
                ('action_code', models.CharField(max_length=64, verbose_name='Action code')),
                ('integration_status', models.CharField(choices=[('Created', 'Created'), ('Success', 'Success'), ('Failed', 'Failed')], default='Created', max_length=16, verbose_name='Integration status')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created at')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated at')),
            ],
            options={
                'verbose_name': 'Admitad postback event',
                'verbose_name_plural': 'Admitad postback events',
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='AdmitadPostbackRequest',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('product_id', models.PositiveIntegerField(verbose_name='Product ID')),
                ('position_id', models.PositiveIntegerField(verbose_name='Position ID')),
                ('quantity', models.PositiveIntegerField(verbose_name='Quantity')),
                ('currency_code', models.CharField(max_length=3, verbose_name='Currency_code')),
                ('tariff_code', models.CharField(max_length=16, verbose_name='Tariff code')),
                ('price', models.DecimalField(decimal_places=2, max_digits=12, verbose_name='Price')),
                ('request_url', models.URLField(verbose_name='Request URL')),
                ('integration_status', models.CharField(choices=[('Created', 'Created'), ('Success', 'Success'), ('Failed', 'Failed')], default='Created', max_length=16, verbose_name='Integration status')),
                ('error_text', models.TextField(blank=True, null=True, verbose_name='Error text')),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='requests', to='admitad.AdmitadPostbackEvent', verbose_name='Event')),
            ],
            options={
                'verbose_name': 'Admitad postback request',
                'verbose_name_plural': 'Admitad postback requests',
                'abstract': False,
            },
        ),
    ]
