# Generated by Django 2.2 on 2021-08-05 07:26

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import ra.base.models


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_date', models.DateTimeField(default=django.utils.timezone.now, verbose_name='creation date and time')),
                ('lastmod', models.DateTimeField(db_index=True, verbose_name='last modification')),
                ('slug', models.SlugField(blank=True, help_text='For fast recall', unique=True, verbose_name='Identifier slug')),
                ('title', models.CharField(db_index=True, max_length=255, unique=True, verbose_name='Name')),
                ('notes', models.TextField(blank=True, null=True, verbose_name='Notes')),
                ('fathers_name', models.CharField(blank=True, max_length=255, null=True)),
                ('mothers_name', models.CharField(blank=True, max_length=255, null=True)),
                ('home_district', models.CharField(blank=True, max_length=255, null=True)),
                ('spouse_occupation', models.CharField(blank=True, max_length=255, null=True)),
                ('spouse_district', models.CharField(blank=True, max_length=255, null=True)),
                ('religion', models.CharField(blank=True, max_length=255, null=True)),
                ('date_joining', models.DateField(blank=True, null=True)),
                ('entry_designation', models.CharField(blank=True, max_length=255, null=True)),
                ('entry_scale', models.CharField(blank=True, max_length=255, null=True)),
                ('picture', models.FileField(blank=True, null=True, upload_to='documents/%Y/%m/%d')),
                ('archive_status', models.CharField(blank=True, choices=[('yes', 'yes'), ('no', 'no')], max_length=32)),
                ('status', models.CharField(blank=True, choices=[('active', 'active'), ('inactive', 'inactive')], max_length=32)),
                ('lastmod_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='hr_employee_lastmod_related', to=settings.AUTH_USER_MODEL, verbose_name='last modification by')),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='hr_employee_related', to=settings.AUTH_USER_MODEL, verbose_name='owner')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='Employee', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
            bases=(ra.base.models.DiffingMixin, models.Model),
        ),
        migrations.CreateModel(
            name='Training',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title_trainin', models.CharField(blank=True, max_length=255, null=True)),
                ('institution', models.CharField(blank=True, max_length=255, null=True)),
                ('date_from', models.DateField(blank=True, null=True)),
                ('date_to', models.DateField(blank=True, null=True)),
                ('trining_type', models.CharField(blank=True, choices=[('local', 'local'), ('foreign', 'foreign')], max_length=32)),
                ('employee', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Training', to='hr.Employee')),
            ],
        ),
        migrations.CreateModel(
            name='ServiceHistory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('designation', models.CharField(blank=True, max_length=255, null=True)),
                ('office_name', models.CharField(blank=True, max_length=255, null=True)),
                ('section', models.CharField(blank=True, max_length=255, null=True)),
                ('date_from', models.DateField(blank=True, null=True)),
                ('employee', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='ServiceHistory', to='hr.Employee')),
            ],
        ),
        migrations.CreateModel(
            name='Retirement_year',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('year', models.DateField(blank=True, null=True)),
                ('date', models.DateField(blank=True, null=True)),
                ('employee', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Retirement_year', to='hr.Employee')),
            ],
        ),
        migrations.CreateModel(
            name='Rest_of_recreation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_from', models.DateField(blank=True, null=True)),
                ('coming_date', models.DateField(blank=True, null=True)),
                ('employee', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Rest_of_recreation', to='hr.Employee')),
            ],
        ),
        migrations.CreateModel(
            name='Promotions',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_promotion', models.DateField(blank=True, null=True)),
                ('designation', models.CharField(blank=True, max_length=255, null=True)),
                ('pay_scale', models.CharField(blank=True, max_length=255, null=True)),
                ('nature_promotion', models.CharField(blank=True, max_length=255, null=True)),
                ('employee', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Promotions', to='hr.Employee')),
            ],
        ),
        migrations.CreateModel(
            name='Languages',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('languages', models.CharField(blank=True, max_length=255, null=True)),
                ('read', models.CharField(blank=True, max_length=255, null=True)),
                ('write', models.CharField(blank=True, max_length=255, null=True)),
                ('speak', models.CharField(blank=True, max_length=255, null=True)),
                ('employee', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Languages', to='hr.Employee')),
            ],
        ),
        migrations.CreateModel(
            name='Employee_Achievement',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.TextField(blank=True, null=True)),
                ('no_of_units_completed', models.DecimalField(decimal_places=2, default='0.00', max_digits=12)),
                ('points_on_unit_task', models.DecimalField(decimal_places=2, default='0.00', max_digits=12)),
                ('total_units_points', models.DecimalField(decimal_places=2, default='0.00', max_digits=12)),
                ('date_achivement', models.DateField(blank=True, null=True)),
                ('points_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='ManagerAchievement', to='hr.Employee')),
                ('points_to', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='EmployeeAchievement', to='hr.Employee')),
            ],
        ),
        migrations.CreateModel(
            name='Education',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name_institution', models.CharField(blank=True, max_length=255, null=True)),
                ('principals_subject', models.CharField(blank=True, max_length=255, null=True)),
                ('degree', models.CharField(blank=True, max_length=255, null=True)),
                ('year', models.CharField(blank=True, max_length=255, null=True)),
                ('division', models.CharField(blank=True, max_length=255, null=True)),
                ('employee', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Education', to='hr.Employee')),
            ],
        ),
        migrations.CreateModel(
            name='District',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=255, null=True)),
                ('status', models.CharField(blank=True, choices=[('active', 'active'), ('inactive', 'inactive')], max_length=32)),
                ('employee', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='District', to='hr.Employee')),
            ],
        ),
        migrations.CreateModel(
            name='DisciplinaryAction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nature_offence', models.CharField(blank=True, max_length=255, null=True)),
                ('punishment', models.CharField(blank=True, max_length=255, null=True)),
                ('date', models.DateField(blank=True, null=True)),
                ('employee', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='DisciplinaryAction', to='hr.Employee')),
            ],
        ),
        migrations.CreateModel(
            name='Children',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=255, null=True)),
                ('sex', models.CharField(blank=True, choices=[('male', 'male'), ('female', 'female'), ('otherother', 'other')], max_length=32)),
                ('dob', models.DateField(blank=True, null=True)),
                ('employee', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Children', to='hr.Employee')),
            ],
        ),
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('road_village', models.CharField(blank=True, max_length=255, null=True)),
                ('postoffice', models.CharField(blank=True, max_length=255, null=True)),
                ('post_code', models.CharField(blank=True, max_length=255, null=True)),
                ('flat_no', models.CharField(blank=True, max_length=255, null=True)),
                ('police_station_thana', models.CharField(blank=True, max_length=255, null=True)),
                ('district', models.CharField(blank=True, max_length=255, null=True)),
                ('date_from', models.DateField(blank=True, null=True)),
                ('address_type', models.CharField(blank=True, choices=[('present', 'present'), ('permanent', 'permanent')], max_length=32)),
                ('employee', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Address', to='hr.Employee')),
            ],
        ),
    ]
