# Generated by Django 2.1.11 on 2019-08-27 18:47

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('api', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='FAQ',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('question', models.CharField(max_length=400)),
                ('answer', models.CharField(max_length=400)),
            ],
            options={
                'ordering': ('pk',),
            },
        ),
        migrations.CreateModel(
            name='HistoricalPaystackPlan',
            fields=[
                ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('currency', models.CharField(default='NGN', max_length=100)),
                ('interval', models.FloatField(choices=[('daily', 'D'), ('weekly', 'W'), ('monthly', 'M'), ('biannually', 'B'), ('annually', 'A')], max_length=8)),
                ('amount', models.FloatField(default=0)),
                ('code', models.CharField(blank=True, max_length=200, null=True)),
                ('invoice_limit', models.IntegerField(blank=True, null=True)),
                ('receivedData', models.CharField(blank=True, max_length=500, null=True)),
                ('history_id', models.AutoField(primary_key=True, serialize=False)),
                ('history_date', models.DateTimeField()),
                ('history_change_reason', models.CharField(max_length=100, null=True)),
                ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
                ('fundSource', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='api.FundSource')),
            ],
            options={
                'verbose_name': 'historical paystack plan',
                'ordering': ('-history_date', '-history_id'),
                'get_latest_by': 'history_date',
            },
            bases=(simple_history.models.HistoricalChanges, models.Model),
        ),
        migrations.CreateModel(
            name='PaystackPlan',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('currency', models.CharField(default='NGN', max_length=100)),
                ('interval', models.FloatField(choices=[('daily', 'D'), ('weekly', 'W'), ('monthly', 'M'), ('biannually', 'B'), ('annually', 'A')], max_length=8)),
                ('amount', models.FloatField(default=0)),
                ('code', models.CharField(blank=True, max_length=200, null=True)),
                ('invoice_limit', models.IntegerField(blank=True, null=True)),
                ('receivedData', models.CharField(blank=True, max_length=500, null=True)),
                ('fundSource', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='paystack_plan', to='api.FundSource')),
            ],
            options={
                'ordering': ('pk',),
            },
        ),
        migrations.CreateModel(
            name='Subscription',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('email', models.CharField(max_length=50)),
                ('reference', models.CharField(max_length=100, unique=True)),
                ('plan_code', models.CharField(max_length=100)),
                ('email_token', models.CharField(max_length=100)),
                ('subscription_code', models.CharField(max_length=100)),
                ('paystack_plan', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='plan_subscription', to='external.PaystackPlan')),
            ],
            options={
                'ordering': ('pk',),
            },
        ),
        migrations.CreateModel(
            name='SubscriptionHistory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('data', models.CharField(max_length=400)),
                ('dateReceived', models.DateTimeField(auto_now_add=True)),
                ('subscription', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='sub_history', to='external.Subscription')),
            ],
            options={
                'ordering': ('pk',),
            },
        ),
        migrations.CreateModel(
            name='Testimonial',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('email', models.CharField(max_length=100)),
                ('photoUrl', models.CharField(max_length=200)),
                ('content', models.CharField(max_length=400)),
            ],
            options={
                'ordering': ('pk',),
            },
        ),
    ]
