# Generated by Django 2.0.5 on 2018-07-18 11:54

from decimal import Decimal
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import sorp_app.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Board',
            fields=[
                ('id', models.SmallIntegerField(unique=True)),
                ('name', models.CharField(max_length=16, primary_key=True, serialize=False)),
                ('full_name', models.CharField(max_length=128)),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.SmallIntegerField(unique=True)),
                ('name', models.CharField(max_length=16, primary_key=True, serialize=False)),
                ('full_name', models.CharField(max_length=64)),
            ],
        ),
        migrations.CreateModel(
            name='DocumentInfo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('submitted', models.CharField(max_length=3)),
            ],
        ),
        migrations.CreateModel(
            name='Documents',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('doc_name', models.CharField(max_length=512)),
            ],
        ),
        migrations.CreateModel(
            name='Due',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('library_due', models.DecimalField(decimal_places=4, default=Decimal('0'), max_digits=10)),
                ('hostel_due', models.DecimalField(decimal_places=4, default=Decimal('0'), max_digits=10)),
                ('academic_due', models.DecimalField(decimal_places=4, default=Decimal('0'), max_digits=10)),
            ],
        ),
        migrations.CreateModel(
            name='Result',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('semester', models.SmallIntegerField(choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9), (10, 10)], default=1)),
                ('sgpi', models.DecimalField(decimal_places=2, default=Decimal('0'), max_digits=4)),
                ('cgpi', models.DecimalField(decimal_places=2, default=Decimal('0'), max_digits=4)),
            ],
        ),
        migrations.CreateModel(
            name='StudentFirstFeeStatus',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fee_josaa_amount', models.PositiveIntegerField()),
                ('fee_josaa_date', models.DateField(default=None)),
                ('fee_NITH_amount', models.PositiveIntegerField()),
                ('fee_nith_date', models.DateField(default=None)),
                ('fee_nith_receipt_no', models.CharField(max_length=32)),
                ('fee_total', models.PositiveIntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='StudentInfo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('reg_staff', models.CharField(max_length=50)),
                ('img', models.ImageField(default='def_profile_pic.jpg', upload_to=sorp_app.models.get_image_path)),
                ('year_of_admission', models.SmallIntegerField(default=sorp_app.models.currYear)),
                ('active_status', models.BooleanField(default=True)),
                ('ug_sem', models.SmallIntegerField(default=1)),
                ('date_of_admission', models.DateField(auto_now=True)),
                ('institute', models.CharField(max_length=16)),
                ('name_eng', models.CharField(max_length=64)),
                ('name_hindi', models.CharField(blank=True, max_length=64)),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('gender', models.CharField(choices=[('Male', 'Male'), ('Female', 'Female'), ('Other', 'Other')], max_length=8)),
                ('dob', models.DateField()),
                ('religion', models.CharField(choices=[('Christian', 'Christian'), ('Hinduism', 'Hinduism'), ('Jainism', 'Jainism'), ('Muslim', 'Muslim'), ('Buddhism', 'Buddhism'), ('Sikhism', 'Sikhism'), ('Judaism', 'Judaism'), ('Zoroastrianism', 'Zoroastrianism')], max_length=16)),
                ('contact', models.CharField(max_length=16)),
                ('aadhar_no', models.CharField(max_length=16, unique=True)),
                ('area', models.CharField(choices=[('Rural', 'Rural'), ('Urban', 'Urban')], max_length=16)),
                ('b_country', models.CharField(max_length=32)),
                ('b_state', models.CharField(max_length=32)),
                ('nearest_rs', models.CharField(blank=True, max_length=64)),
                ('corr_addr', models.CharField(max_length=256)),
                ('perm_addr', models.CharField(max_length=256)),
                ('jee_roll_no', models.BigIntegerField()),
                ('jee_score', models.PositiveIntegerField()),
                ('jee_ai_rank', models.PositiveIntegerField()),
                ('jee_cat_rank', models.PositiveIntegerField(blank=True, null=True)),
                ('int_country', models.CharField(max_length=32)),
                ('int_state', models.CharField(max_length=32)),
                ('int_percentage', models.DecimalField(db_column='12th Percentage', decimal_places=3, max_digits=5)),
                ('int_pass_year', models.IntegerField(db_column='10+2 Pass Year', default=sorp_app.models.currYear)),
                ('int_school_type', models.CharField(choices=[('Government', 'Government School'), ('Private', 'Private School')], db_column='12th School type', max_length=16)),
                ('int_school_area', models.CharField(choices=[('Rural', 'Rural'), ('Urban', 'Urban')], db_column='12th School Area', max_length=8)),
                ('int_school_name', models.CharField(db_column='12th School name', max_length=64)),
                ('hosteler', models.BooleanField()),
                ('hostel_name', models.CharField(blank=True, choices=[('KBH', 'Kailash Boys Hostel'), ('Satpura', 'Satpura Hostel'), ('AGH', 'Ambika Girls Hostel'), ('PGH', 'Parvati Girls Hostel')], max_length=16, null=True)),
                ('entry_no', models.PositiveIntegerField(unique=True)),
                ('reg_no', models.CharField(max_length=64, unique=True)),
                ('roll_no', models.CharField(max_length=16, unique=True)),
                ('father_name', models.CharField(max_length=64)),
                ('father_contact', models.CharField(blank=True, max_length=16)),
                ('father_email', models.EmailField(blank=True, max_length=254)),
                ('mother_name', models.CharField(max_length=64)),
                ('mother_contact', models.CharField(blank=True, max_length=16)),
                ('mother_email', models.EmailField(blank=True, max_length=254)),
                ('guardian_name', models.CharField(blank=True, max_length=64)),
                ('guardian_contact', models.CharField(blank=True, max_length=16)),
                ('guardian_email', models.EmailField(blank=True, max_length=254)),
                ('family_income', models.PositiveIntegerField(default=0)),
                ('fee_waiver', models.CharField(choices=[('Not Claimed', 'Not Claimed'), ('SC/ST/PwD', 'SC/ST/PwD'), ('Income Less than 1 Lakhs', 'Income Less than 1 Lakhs'), ('Income between 1 and 5 Lakhs', 'Income between 1 and 5 Lakhs')], max_length=64)),
                ('category_admission', models.ForeignKey(db_column='Admitted Category', on_delete=django.db.models.deletion.PROTECT, related_name='admission', to='sorp_app.Category')),
                ('category_main', models.ForeignKey(db_column='Main Category', on_delete=django.db.models.deletion.PROTECT, related_name='main', to='sorp_app.Category')),
                ('int_school_board', models.ForeignKey(db_column='12th Board', on_delete=django.db.models.deletion.PROTECT, to='sorp_app.Board')),
                ('stud_doc', models.ManyToManyField(through='sorp_app.DocumentInfo', to='sorp_app.Documents')),
            ],
        ),
        migrations.CreateModel(
            name='Subjects',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('year_onwards', models.SmallIntegerField()),
                ('semester', models.IntegerField(choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9), (10, 10)])),
                ('sub_code', models.CharField(max_length=16)),
                ('sub_name', models.CharField(max_length=256)),
                ('sub_L', models.SmallIntegerField()),
                ('sub_T', models.SmallIntegerField()),
                ('sub_P', models.SmallIntegerField()),
                ('sub_C', models.SmallIntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='UGBranch',
            fields=[
                ('id', models.SmallIntegerField(unique=True)),
                ('name', models.CharField(max_length=32, primary_key=True, serialize=False)),
                ('full_name', models.CharField(max_length=128)),
                ('code', models.CharField(max_length=16, unique=True)),
                ('section', models.CharField(max_length=8, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='UGClass',
            fields=[
                ('id', models.SmallIntegerField(unique=True)),
                ('name', models.CharField(max_length=16, primary_key=True, serialize=False)),
                ('full_name', models.CharField(max_length=64)),
            ],
        ),
        migrations.AddField(
            model_name='subjects',
            name='branch',
            field=models.ForeignKey(db_column='branch', on_delete=django.db.models.deletion.CASCADE, to='sorp_app.UGBranch'),
        ),
        migrations.AddField(
            model_name='subjects',
            name='classname',
            field=models.ForeignKey(db_column='class', on_delete=django.db.models.deletion.CASCADE, to='sorp_app.UGClass'),
        ),
        migrations.AddField(
            model_name='studentinfo',
            name='ug_branch',
            field=models.ForeignKey(db_column='UGBranch', on_delete=django.db.models.deletion.PROTECT, to='sorp_app.UGBranch'),
        ),
        migrations.AddField(
            model_name='studentinfo',
            name='ug_class',
            field=models.ForeignKey(db_column='UGClass', on_delete=django.db.models.deletion.PROTECT, to='sorp_app.UGClass'),
        ),
        migrations.AddField(
            model_name='studentinfo',
            name='user',
            field=models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='studentfirstfeestatus',
            name='student',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='sorp_app.StudentInfo'),
        ),
        migrations.AddField(
            model_name='result',
            name='roll_no',
            field=models.ForeignKey(db_column='roll_no', on_delete=django.db.models.deletion.CASCADE, to='sorp_app.StudentInfo', to_field='roll_no'),
        ),
        migrations.AddField(
            model_name='due',
            name='roll_no',
            field=models.OneToOneField(db_column='roll_no', on_delete=django.db.models.deletion.CASCADE, to='sorp_app.StudentInfo', to_field='roll_no'),
        ),
        migrations.AddField(
            model_name='documentinfo',
            name='document',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sorp_app.Documents'),
        ),
        migrations.AddField(
            model_name='documentinfo',
            name='student',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sorp_app.StudentInfo'),
        ),
    ]
