# Generated by Django 2.0.6 on 2018-07-12 17:52

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='TransactionDetail',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('update_date', drfaddons.datatypes.UnixTimestampField(auto_created=True)),
                ('create_date', drfaddons.datatypes.UnixTimestampField(auto_now_add=True)),
                ('category', models.CharField(choices=[('C', 'Credit'), ('D', 'Debit')], max_length=6, verbose_name='Category')),
                ('transaction_date', models.DateField(verbose_name='Transaction Date')),
                ('amount', models.FloatField(verbose_name='Amount')),
                ('comments', models.TextField(blank=True, null=True, verbose_name='Comments')),
                ('contact', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='drf_contact.ContactDetail')),
                ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Transaction Detail',
                'verbose_name_plural': 'Transaction Details',
            },
        ),
        migrations.CreateModel(
            name='TransactionMode',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('update_date', drfaddons.datatypes.UnixTimestampField(auto_created=True)),
                ('create_date', drfaddons.datatypes.UnixTimestampField(auto_now_add=True)),
                ('mode', models.CharField(max_length=254, unique=True, verbose_name='Mode of Transfer')),
                ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Transaction Mode',
                'verbose_name_plural': 'Transaction Modes',
            },
        ),
        migrations.AddField(
            model_name='transactiondetail',
            name='mode',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='drf_transaction.TransactionMode'),
        ),
    ]
