# Generated by Django 2.1.15 on 2021-02-26 13:39

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.AUTH_USER_MODEL),
        ('core', '0002_auto_20210226_1256'),
    ]

    operations = [
        migrations.CreateModel(
            name='Card',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('card_number', models.CharField(max_length=20)),
                ('balance', models.PositiveIntegerField(verbose_name='Current balance')),
            ],
        ),
        migrations.CreateModel(
            name='Transaction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('merchant_name', models.CharField(max_length=100)),
                ('amount', models.PositiveIntegerField()),
                ('merchant_id', models.CharField(max_length=4)),
                ('card', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Card')),
            ],
        ),
        migrations.AddField(
            model_name='bankaccount',
            name='user',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='bankaccount',
            name='customer_name',
            field=models.CharField(max_length=255, null=True),
        ),
        migrations.AddField(
            model_name='card',
            name='bank_account',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.BankAccount'),
        ),
    ]
