# Generated by Django 2.0 on 2017-12-25 20:26

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Branch',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('branch_ID', models.CharField(max_length=16)),
                ('location', models.CharField(max_length=32)),
            ],
        ),
        migrations.CreateModel(
            name='Cart',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('qty', models.IntegerField(verbose_name='Quantity Sold')),
            ],
        ),
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, verbose_name='Employee Name')),
                ('employee_ID', models.CharField(max_length=16)),
                ('dob', models.DateTimeField(verbose_name='Date Of Birth')),
                ('doj', models.DateTimeField(verbose_name='Date Of Joining')),
                ('designation', models.CharField(choices=[('SE', 'Sales Executive'), ('MGR', 'Manager')], max_length=3)),
                ('basic_salary', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='Inventory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('qty', models.IntegerField(verbose_name='Quantity Left')),
                ('branch', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='erp.Branch')),
            ],
        ),
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('item_name', models.CharField(max_length=64, verbose_name='Item Name')),
                ('item_ID', models.CharField(max_length=16)),
                ('sale_price', models.FloatField(default=0.0, verbose_name='Item Sale Price')),
                ('item_cost', models.FloatField(default=0.0, verbose_name='Item Cost')),
                ('manufacturer', models.CharField(max_length=64, verbose_name='Manufacturing Company name')),
                ('mfd_date', models.DateTimeField(verbose_name='Manufacturing Date')),
                ('exp_date', models.DateTimeField(verbose_name='Expiry Date')),
                ('points', models.FloatField(default=0.0)),
            ],
        ),
        migrations.CreateModel(
            name='Transaction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('transaction_ID', models.CharField(max_length=16)),
                ('date', models.DateField(verbose_name='Transaction Date')),
                ('branch', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='erp.Branch')),
                ('sales_executive', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='erp.Employee')),
            ],
        ),
        migrations.AddField(
            model_name='inventory',
            name='item',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='erp.Item'),
        ),
        migrations.AddField(
            model_name='cart',
            name='item',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='erp.Item'),
        ),
        migrations.AddField(
            model_name='cart',
            name='transaction',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='erp.Transaction'),
        ),
        migrations.AddField(
            model_name='branch',
            name='branch_manager',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='erp.Employee'),
        ),
    ]
