text: # Generated by Django 2.2 on 2020-10-29 03:49
  
  from django.conf import settings
  from django.db import migrations, models
  import django.db.models.deletion
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
          migrations.swappable_dependency(settings.AUTH_USER_MODEL),
      ]
  
      operations = [
          migrations.CreateModel(
              name='Account',
              fields=[
                  ('account_number', models.AutoField(primary_key=True, serialize=False)),
                  ('account_type', models.CharField(choices=[('SAVINGS', 'Savings'), ('CHECKING', 'Checking'), ('CREDIT_CARD', 'Credit Card')], max_length=15)),
                  ('account_balance', models.DecimalField(decimal_places=2, default=0, max_digits=9)),
                  ('account_opening_date', models.DateTimeField(auto_now_add=True)),
                  ('account_closing_date', models.DateTimeField(blank=True, default=None, null=True)),
              ],
          ),
          migrations.CreateModel(
              name='Transaction',
              fields=[
                  ('transaction_id', models.AutoField(primary_key=True, serialize=False)),
                  ('transaction_amount', models.DecimalField(decimal_places=2, default=0, max_digits=9, verbose_name='Amount')),
                  ('transaction_date', models.DateTimeField(auto_now_add=True)),
                  ('Type', models.CharField(choices=[('C', 'Credit'), ('D', 'Debit'), ('T', 'Transfer')], default='T', max_length=1)),
                  ('merchant_name', models.CharField(max_length=255, verbose_name='Merchant Name')),
                  ('transaction_category', models.CharField(choices=[('GROCERIES', 'Groceries'), ('ENTERTAINMENT', 'Entertainment'), ('HOME', 'Home and Decor'), ('FOOD_AND_DRINKS', 'Food and Drinks'), ('ELECTRONICS', 'Electronics'), ('PERSONAL', 'Personal'), ('HEALTH', 'Health and Wellness'), ('GAS', 'Gas'), ('SHOPPING', 'Shopping'), ('GIFT_AND_DONATION', 'Gift and Donations'), ('OTHERS', 'Others')], max_length=50)),
                  ('split_transactions_exist', models.BooleanField(default=False)),
                  ('is_split_transaction', models.BooleanField(default=False)),
                  ('account_number', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='bank.Account')),
                  ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='transaction', to=settings.AUTH_USER_MODEL)),
                  ('parent_transaction_id', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='bank.Transaction')),
              ],
              options={
                  'ordering': ['-transaction_date'],
              },
          ),
          migrations.CreateModel(
              name='Customer',
              fields=[
                  ('customer_id', models.AutoField(primary_key=True, serialize=False)),
                  ('name', models.CharField(max_length=255, verbose_name='Full Name')),
                  ('mobile_no', models.CharField(max_length=10, verbose_name='Mobile/Phone Number')),
                  ('email', models.EmailField(max_length=254, unique=True)),
                  ('address1', models.CharField(max_length=1024, verbose_name='Address Line 1')),
                  ('address2', models.CharField(blank=True, max_length=1024, null=True, verbose_name='Address Line 2')),
                  ('city', models.CharField(max_length=255, verbose_name='City')),
                  ('state', models.CharField(max_length=255, verbose_name='State')),
                  ('zip_code', models.CharField(max_length=12, verbose_name='ZIP / Postal code')),
                  ('country', models.CharField(max_length=20, verbose_name='Country')),
                  ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
              ],
          ),
          migrations.CreateModel(
              name='AccountCustomer',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='account_customer', to='bank.Account')),
                  ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='account_customer', to='bank.Customer')),
              ],
          ),
      ]
  