# Generated by Django 3.0.4 on 2020-04-25 19:54

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        migrations.swappable_dependency(settings.SUBSCRIPTIONS_API_USERSUBSCRIPTION_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='SubscriptionTransaction',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_transaction', models.DateTimeField(help_text='the datetime the transaction was billed', verbose_name='transaction date')),
                ('amount', models.DecimalField(blank=True, decimal_places=2, help_text='how much was billed for the user', max_digits=19, null=True)),
                ('paid', models.BooleanField(default=False, help_text='Mark transaction has paid')),
                ('subscription', models.ForeignKey(help_text='the Subscription that were billed', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='transactions', to=settings.SUBSCRIPTIONS_API_USERSUBSCRIPTION_MODEL)),
                ('user', models.ForeignKey(help_text='the user that this subscription was billed for', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='subscription_transactions', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ('date_transaction', 'user'),
                'abstract': False,
            },
        ),
    ]
