# Generated by Django 2.2.3 on 2019-07-08 18:48

from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import django_countries.fields
import phonenumber_field.modelfields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Account',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('AccoutnTitle', models.CharField(max_length=50)),
                ('Description', models.CharField(max_length=50)),
                ('InitialBalance', models.DecimalField(decimal_places=2, max_digits=5)),
                ('AccountNumber', models.CharField(max_length=10)),
                ('ContactPerson', models.CharField(max_length=50)),
                ('PhoneNumber', phonenumber_field.modelfields.PhoneNumberField(max_length=128, region=None)),
            ],
        ),
        migrations.CreateModel(
            name='Bank',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('BankName', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Client',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('CompanyName', models.CharField(max_length=255)),
                ('ProprietorName', models.CharField(max_length=255)),
                ('PhoneNumber_1', phonenumber_field.modelfields.PhoneNumberField(max_length=128, region=None)),
                ('PhoneNumber_2', phonenumber_field.modelfields.PhoneNumberField(blank=True, max_length=128, region=None)),
                ('Email', models.EmailField(max_length=254)),
                ('DateOfBirth', models.DateField()),
                ('Address', models.TextField()),
                ('City', models.CharField(max_length=50)),
                ('ZipCode', models.CharField(max_length=5)),
                ('Country', django_countries.fields.CountryField(max_length=2)),
            ],
        ),
        migrations.CreateModel(
            name='ClientGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('GroupName', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='ExpenseCategoryModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ExpenseCategory', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='IncomeCategoryModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('IncomeCategory', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='PaymentMethodModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('PaymentMethod', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ProductName', models.CharField(max_length=50)),
                ('Images_1', models.ImageField(upload_to='product/')),
                ('Images_2', models.ImageField(blank=True, upload_to='product/')),
                ('ProductDescription', models.TextField()),
                ('ProductUnit', models.CharField(max_length=50)),
                ('Carton', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='ProductGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('GroupName', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Supplier',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('CompanyName', models.CharField(max_length=255)),
                ('ProprietorName', models.CharField(max_length=255)),
                ('PhoneNumber_1', phonenumber_field.modelfields.PhoneNumberField(max_length=128, region=None)),
                ('PhoneNumber_2', phonenumber_field.modelfields.PhoneNumberField(blank=True, max_length=128, region=None)),
                ('Email', models.EmailField(max_length=254)),
                ('DateOfBirth', models.DateField()),
                ('Address', models.TextField()),
                ('City', models.CharField(max_length=50)),
                ('ZipCode', models.CharField(max_length=5)),
                ('Country', django_countries.fields.CountryField(max_length=2)),
            ],
        ),
        migrations.CreateModel(
            name='SupplierGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('GroupName', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='TransferModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Date', models.DateField(default=django.utils.timezone.now)),
                ('Description', models.TextField()),
                ('Amount', models.DecimalField(decimal_places=2, max_digits=10)),
                ('Tags', models.CharField(max_length=50)),
                ('Reference', models.CharField(max_length=50)),
                ('Method', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='management.PaymentMethodModel')),
                ('Money_From', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='management.PaymentMethodModel')),
                ('Mpney_To', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='management.PaymentMethodModel')),
            ],
        ),
        migrations.CreateModel(
            name='SupplierPayment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Date', models.DateField(default=django.utils.timezone.now)),
                ('ChequeNo', models.CharField(max_length=50)),
                ('Description', models.TextField()),
                ('Amount', models.DecimalField(decimal_places=2, max_digits=10)),
                ('Account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='management.Account')),
                ('BankName', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='management.Bank')),
                ('Category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='management.IncomeCategoryModel')),
                ('PaymentMethod', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='management.PaymentMethodModel')),
                ('SupplierName', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='management.Supplier')),
            ],
        ),
        migrations.AddField(
            model_name='supplier',
            name='Group',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='management.SupplierGroup'),
        ),
        migrations.CreateModel(
            name='RecieveModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Date', models.DateField(default=django.utils.timezone.now)),
                ('Description', models.TextField()),
                ('Amount', models.DecimalField(decimal_places=2, max_digits=10)),
                ('ChequeNo', models.CharField(max_length=50)),
                ('Account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='management.Account')),
                ('BankName', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='management.Bank')),
                ('Category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='management.IncomeCategoryModel')),
                ('Client', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='management.Client')),
                ('PaymentMethod', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='management.PaymentMethodModel')),
            ],
        ),
        migrations.CreateModel(
            name='PurchaseReturn',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Date', models.DateField(default=django.utils.timezone.now)),
                ('ReturnQuantity', models.IntegerField()),
                ('BuyPrice', models.DecimalField(decimal_places=2, max_digits=5)),
                ('Note', models.TextField(blank=True)),
                ('ProductName', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='management.Product')),
                ('SupplierName', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='management.Supplier')),
            ],
        ),
        migrations.CreateModel(
            name='PurchaseProduct',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Date', models.DateField(default=django.utils.timezone.now)),
                ('BuyPrice', models.DecimalField(decimal_places=2, max_digits=5)),
                ('SellPrice', models.DecimalField(decimal_places=2, max_digits=5)),
                ('Note', models.TextField(blank=True)),
                ('ProductName', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='management.Product')),
                ('SupplierName', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='management.Supplier')),
            ],
        ),
        migrations.AddField(
            model_name='product',
            name='Group',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='management.ProductGroup'),
        ),
        migrations.CreateModel(
            name='ExpenseModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Date', models.DateField(default=django.utils.timezone.now)),
                ('Description', models.TextField()),
                ('Amount', models.DecimalField(decimal_places=2, max_digits=10)),
                ('ChequeNo', models.CharField(max_length=50)),
                ('ExpenseVoucher', models.ImageField(upload_to='Voucher/')),
                ('Account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='management.Account')),
                ('BankName', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='management.Bank')),
                ('Category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='management.IncomeCategoryModel')),
                ('PaymentMethod', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='management.PaymentMethodModel')),
            ],
        ),
        migrations.AddField(
            model_name='client',
            name='Group',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='management.ClientGroup'),
        ),
    ]
