# Generated by Django 3.1.1 on 2020-11-05 11:53

from django.conf import settings
import django.contrib.auth.models
import django.contrib.auth.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='AccomodationFee',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('pub_date', models.DateField(default=django.utils.timezone.now)),
                ('amount', models.DecimalField(decimal_places=0, max_digits=7)),
            ],
        ),
        migrations.CreateModel(
            name='Asset',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20)),
                ('qty', models.IntegerField()),
                ('price', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Attendance',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_present', models.BooleanField()),
                ('date', models.DateField(default=django.utils.timezone.now)),
            ],
            options={
                'verbose_name_plural': 'Attendance',
            },
        ),
        migrations.CreateModel(
            name='Calendar',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='Event Name')),
                ('description', models.TextField(verbose_name='Event Descripition')),
                ('start_date', models.DateTimeField(verbose_name='Initial Date (and time) of the event')),
                ('end_date', models.DateTimeField(verbose_name='Final (and time) of the event')),
                ('color', models.CharField(max_length=100, verbose_name='Event Color')),
                ('icon', models.CharField(max_length=100, verbose_name='Event Icon')),
            ],
        ),
        migrations.CreateModel(
            name='ChartofAccount',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('acc_no', models.IntegerField(unique=True)),
                ('name', models.CharField(max_length=50, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('category', models.CharField(max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='Exam',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField(default=django.utils.timezone.now)),
                ('exam_type', models.CharField(max_length=20)),
                ('exam', models.FileField(upload_to='exams')),
            ],
        ),
        migrations.CreateModel(
            name='ExamQuestion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('question', models.TextField()),
                ('exam', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.exam')),
            ],
        ),
        migrations.CreateModel(
            name='GradeLevel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='MyClass',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20, unique=True, verbose_name='Name of class')),
                ('position', models.IntegerField(unique=True)),
            ],
            options={
                'verbose_name_plural': 'School classes',
            },
        ),
        migrations.CreateModel(
            name='PlannerActivityStage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='Name of stage')),
            ],
        ),
        migrations.CreateModel(
            name='PlannerActivityType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='Name of activity')),
            ],
        ),
        migrations.CreateModel(
            name='Pupil',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('birth_place', models.CharField(max_length=100)),
                ('reasons_at_malen', models.TextField()),
                ('status', models.CharField(max_length=20)),
                ('class_applied', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='class_applied', to='App.myclass')),
                ('class_joined', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='class_joined', to='App.myclass')),
                ('myclass', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='App.myclass')),
            ],
        ),
        migrations.CreateModel(
            name='SchoolGrade',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('grade', models.CharField(max_length=20)),
                ('benchmark', models.DecimalField(decimal_places=1, max_digits=3, verbose_name='the marks to which and above school grade applies')),
            ],
        ),
        migrations.CreateModel(
            name='Subject',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20, unique=True)),
                ('myclass', models.ManyToManyField(to='App.MyClass')),
            ],
        ),
        migrations.CreateModel(
            name='Teacher',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_ht', models.BooleanField(default=False, verbose_name='Head Teacher')),
                ('is_dc', models.BooleanField(default=False, verbose_name='Discipline Master')),
                ('is_ac', models.BooleanField(default=False, verbose_name='Academic Master')),
                ('is_ct', models.BooleanField(default=False, verbose_name='Class Teacher')),
                ('employee', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='App.employee')),
            ],
        ),
        migrations.CreateModel(
            name='TransportFee',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('year', models.CharField(default=2020, max_length=4)),
                ('location', models.CharField(max_length=20)),
                ('amount', models.DecimalField(decimal_places=0, max_digits=6)),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('middle_name', models.CharField(max_length=20)),
                ('date_joined', models.DateField(default=django.utils.timezone.now)),
                ('sex', models.CharField(max_length=10)),
                ('photo', models.ImageField(blank=True, null=True, upload_to='user/photo')),
                ('is_pupil', models.BooleanField(default=False)),
                ('is_employee', models.BooleanField(default=False)),
                ('is_tr', models.BooleanField(default=False)),
                ('is_it', models.BooleanField(default=False)),
                ('birth_date', models.DateField(blank=True, null=True)),
                ('keeper', models.CharField(max_length=8)),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='TuitionFee',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.IntegerField()),
                ('pub_date', models.DateField(default=django.utils.timezone.now)),
                ('myclass', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.myclass')),
            ],
        ),
        migrations.CreateModel(
            name='TransportFeesCashBook',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.DecimalField(decimal_places=0, max_digits=6)),
                ('date', models.DateField()),
                ('pupil', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Topic',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('subject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.subject')),
            ],
        ),
        migrations.CreateModel(
            name='Teaching',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('myclass', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.myclass')),
                ('subject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.subject')),
                ('teacher', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.teacher')),
            ],
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('task_type', models.CharField(max_length=50)),
                ('task', models.TextField()),
                ('due_date', models.DateTimeField(default=django.utils.timezone.now)),
                ('is_closed', models.BooleanField(default=False)),
                ('teacher', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.teacher')),
            ],
        ),
        migrations.CreateModel(
            name='SubTopic',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('topic', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.topic')),
            ],
        ),
        migrations.CreateModel(
            name='SchoolFeesCashBook',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.DecimalField(decimal_places=0, max_digits=7)),
                ('date', models.DateField(default='2020')),
                ('pupil', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='QuestionChoice',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('choice', models.CharField(max_length=100)),
                ('qn', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.examquestion')),
            ],
        ),
        migrations.CreateModel(
            name='PupilAccount',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.DecimalField(decimal_places=0, max_digits=7)),
                ('name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.pupil')),
            ],
        ),
        migrations.AddField(
            model_name='pupil',
            name='user',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='PreviousSchool',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('level', models.CharField(max_length=10)),
                ('date_admitted', models.DateField()),
                ('date_left', models.DateField()),
                ('reasons', models.TextField()),
                ('medium', models.CharField(max_length=10)),
                ('is_report_attached', models.BooleanField(default=False)),
                ('pupil', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.pupil')),
            ],
        ),
        migrations.AddField(
            model_name='myclass',
            name='class_tr',
            field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='App.teacher'),
        ),
        migrations.AddField(
            model_name='myclass',
            name='level',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='App.gradelevel'),
        ),
        migrations.CreateModel(
            name='MedicalRecords',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_dpt', models.BooleanField(default=False)),
                ('is_diputheria', models.BooleanField(default=False)),
                ('is_tetanus', models.BooleanField(default=False)),
                ('is_pertussis', models.BooleanField(default=False)),
                ('is_pv', models.BooleanField(default=False)),
                ('is_diabetes', models.BooleanField(default=False)),
                ('is_epilepsy', models.BooleanField(default=False)),
                ('is_convulsion', models.BooleanField(default=False)),
                ('is_asthma', models.BooleanField(default=False)),
                ('is_tb', models.BooleanField(default=False)),
                ('is_rheumatism', models.BooleanField(default=False)),
                ('is_Eye_problems', models.BooleanField(default=False)),
                ('is_physical_disabilities', models.BooleanField(default=False)),
                ('medication', models.TextField()),
                ('pupil', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='App.pupil')),
            ],
        ),
        migrations.CreateModel(
            name='LessonPlanner',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('start_class', models.TimeField()),
                ('end_class', models.TimeField()),
                ('main_competence', models.TextField()),
                ('specific_competence', models.TextField()),
                ('major_activity', models.TextField()),
                ('minor_activity', models.TextField()),
                ('teaching_materials', models.TextField()),
                ('reference', models.TextField()),
                ('reflection', models.TextField()),
                ('teaching_evaluation', models.TextField()),
                ('Learning_evaluation', models.TextField()),
                ('remarks', models.TextField()),
                ('attendance', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.attendance')),
                ('myclass', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.myclass')),
                ('subject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.subject')),
                ('teacher', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Journal',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField(default=django.utils.timezone.now)),
                ('payer_payee', models.CharField(max_length=100)),
                ('doc_no', models.CharField(max_length=20)),
                ('cheque_no', models.IntegerField(blank=True, null=True)),
                ('description', models.CharField(default='-', max_length=100)),
                ('amount', models.IntegerField(default=0)),
                ('is_posted', models.BooleanField(default=False)),
                ('cr_ledger', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cr_ledger', to='App.chartofaccount')),
                ('dr_ledger', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dr_ledger', to='App.chartofaccount')),
            ],
            options={
                'verbose_name_plural': 'Journal',
            },
        ),
        migrations.CreateModel(
            name='GuradianParticulars',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('relation', models.CharField(max_length=20)),
                ('first_name', models.CharField(max_length=20)),
                ('middle_name', models.CharField(max_length=20)),
                ('last_name', models.CharField(max_length=20)),
                ('village_street', models.CharField(max_length=20)),
                ('ward', models.CharField(max_length=20)),
                ('division', models.CharField(max_length=20)),
                ('postal_address', models.CharField(max_length=20)),
                ('tel_home', models.CharField(max_length=20)),
                ('tel_office', models.CharField(max_length=20)),
                ('mob', models.CharField(max_length=20)),
                ('occupation', models.CharField(max_length=20)),
                ('nationality', models.CharField(max_length=20)),
                ('tribe', models.CharField(max_length=20)),
                ('religion', models.CharField(max_length=20)),
                ('denomination', models.CharField(max_length=20)),
                ('pupil', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.pupil')),
            ],
        ),
        migrations.AddField(
            model_name='exam',
            name='myclass',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.myclass'),
        ),
        migrations.AddField(
            model_name='exam',
            name='subject',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.subject'),
        ),
        migrations.AddField(
            model_name='employee',
            name='user',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='Contact',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tag', models.CharField(max_length=50)),
                ('tel_office', models.CharField(max_length=50)),
                ('tel_residence', models.CharField(max_length=50)),
                ('address', models.CharField(max_length=20)),
                ('for_emergency', models.BooleanField()),
                ('for_payment', models.BooleanField()),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='ChartofAccountTotal',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, unique=True)),
                ('start', models.IntegerField(unique=True)),
                ('end', models.IntegerField(unique=True)),
            ],
            options={
                'unique_together': {('name', 'start', 'end')},
            },
        ),
        migrations.AddField(
            model_name='chartofaccount',
            name='total',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='App.chartofaccounttotal'),
        ),
        migrations.CreateModel(
            name='CashBook',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('balance', models.IntegerField(default=0)),
                ('journal_entry', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='App.journal')),
                ('ledger', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.chartofaccount')),
            ],
            options={
                'verbose_name_plural': 'Cash Book',
            },
        ),
        migrations.AddField(
            model_name='attendance',
            name='grade',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.myclass'),
        ),
        migrations.AddField(
            model_name='attendance',
            name='name',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.pupil', verbose_name='Name of the Pupil'),
        ),
        migrations.CreateModel(
            name='Allergy',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('allergy', models.CharField(max_length=100)),
                ('medical_records', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.medicalrecords')),
            ],
        ),
        migrations.CreateModel(
            name='Activity',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('activity', models.TextField()),
                ('activity_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.planneractivitytype')),
                ('lesson_planner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.lessonplanner')),
                ('stage', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='App.planneractivitystage')),
            ],
            options={
                'verbose_name_plural': 'Planner Activities',
            },
        ),
        migrations.CreateModel(
            name='Recommendation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('term', models.CharField(max_length=20)),
                ('date', models.DateField()),
                ('recommendation', models.CharField(default='', max_length=100)),
                ('pupil', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.pupil')),
                ('subject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.subject')),
            ],
            options={
                'unique_together': {('pupil', 'term', 'subject', 'date')},
            },
        ),
        migrations.AlterUniqueTogether(
            name='exam',
            unique_together={('subject', 'myclass', 'date', 'exam_type')},
        ),
        migrations.CreateModel(
            name='AcademicProgress',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('marks', models.DecimalField(decimal_places=1, max_digits=4)),
                ('exam', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.exam')),
                ('pupil', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='App.pupil')),
            ],
            options={
                'verbose_name_plural': 'Academic progress',
                'unique_together': {('exam', 'pupil', 'marks')},
            },
        ),
    ]
