# Generated by Django 3.0 on 2020-09-11 11:01

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.SUBSCRIPTIONS_API_USERSUBSCRIPTION_MODEL),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('saas_billing', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='StripeSubscriptionPlanCost',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cost_ref', models.CharField(blank=True, max_length=250, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('cost', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='stripe_plan_cost', to='subscriptions_api.PlanCost')),
            ],
        ),
        migrations.CreateModel(
            name='StripeSubscriptionPlan',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('plan_ref', models.CharField(blank=True, max_length=250, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('plan', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='stripe_subscription_plan', to='subscriptions_api.SubscriptionPlan')),
            ],
        ),
        migrations.CreateModel(
            name='StripeSubscription',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('subscription_ref', models.CharField(max_length=100)),
                ('session_ref', models.CharField(max_length=100, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('subscription', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='stripe_subscription', to=settings.SUBSCRIPTIONS_API_USERSUBSCRIPTION_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='StripeCustomer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('customer_id', models.CharField(blank=True, max_length=250, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='PaypalSubscriptionPlanCost',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cost_ref', models.CharField(blank=True, max_length=250, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('cost', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='paypal_plan_cost', to='subscriptions_api.PlanCost')),
            ],
        ),
        migrations.CreateModel(
            name='PaypalSubscriptionPlan',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('plan_ref', models.CharField(max_length=250)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('plan', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='paypal_subscription_plan', to='subscriptions_api.SubscriptionPlan')),
            ],
        ),
        migrations.CreateModel(
            name='PaypalSubscription',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('subscription_ref', models.CharField(max_length=100)),
                ('payment_link', models.URLField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('subscription', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='paypal_subscription', to=settings.SUBSCRIPTIONS_API_USERSUBSCRIPTION_MODEL)),
            ],
        ),
    ]
