# Generated by Django 3.1.6 on 2021-02-18 15:17

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Applicant',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cpr', models.CharField(max_length=9, verbose_name='CPR No')),
                ('cpr_expiry_date', models.DateField(verbose_name='CPR Expire Date')),
                ('passport_expiry_date', models.DateField(verbose_name='Passport Expire Date')),
                ('fullname', models.CharField(max_length=100, verbose_name='Full Name')),
                ('nationality', models.CharField(choices=[('none', 'Select your nationality'), ('bahraini', 'Bahraini'), ('non_bahraini', 'None Bahraini')], default='none', max_length=50, verbose_name='Nationality')),
                ('gender', models.CharField(choices=[('male', 'Male'), ('female', 'Female')], max_length=10, verbose_name='Gender')),
                ('qualification', models.CharField(choices=[('secondary_school', 'Secondary School'), ('diploma', 'Diploma'), ('bsc', 'BSc'), ('high_diploma', 'High Diploma'), ('master', 'Master'), ('phd', 'PhD')], max_length=50, verbose_name='Qualification')),
                ('occupcation', models.CharField(max_length=50, verbose_name='Occupation')),
                ('has_application', models.BooleanField(default=False, verbose_name='Has Applicatino on process')),
                ('flat_no', models.IntegerField(verbose_name='Flat No')),
                ('building_no', models.IntegerField(verbose_name='Building No')),
                ('road_no', models.IntegerField(verbose_name='Road No')),
                ('area', models.CharField(max_length=50, verbose_name='Area')),
                ('contact1', models.CharField(max_length=50, verbose_name='Phone')),
                ('contact2', models.CharField(max_length=50, verbose_name='Mobile')),
                ('email', models.EmailField(max_length=254, verbose_name='Email')),
                ('cpr_doc', models.FileField(upload_to='doc_library', verbose_name='CPR Doc')),
                ('passport_doc', models.FileField(upload_to='doc_library', verbose_name='Passport Doc')),
                ('behavior_cert_doc', models.FileField(upload_to='doc_library', verbose_name='Behavior Certificate Doc')),
                ('bank_statement_doc', models.FileField(upload_to='doc_library', verbose_name='Bank Statement Doc')),
                ('is_10000_exist', models.BooleanField(default=False, verbose_name='Is 10000 BD exist in Applicant Bank Statement')),
                ('user_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='')),
            ],
            options={
                'verbose_name': 'Applicant',
                'verbose_name_plural': 'Applicants',
            },
        ),
        migrations.CreateModel(
            name='Organization',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cr', models.CharField(max_length=50, verbose_name='CR No')),
                ('cr_reg_date', models.DateField(verbose_name='Registration Date')),
                ('full_en_name', models.CharField(max_length=250, verbose_name='Commercial Eng Name')),
                ('full_ar_name', models.CharField(max_length=250, verbose_name='Commercial Arb Name')),
                ('license_no', models.CharField(max_length=50, verbose_name='License No')),
                ('flat_no', models.IntegerField(verbose_name='Flat No')),
                ('building_no', models.IntegerField(verbose_name='Building No')),
                ('road_no', models.IntegerField(verbose_name='Road No')),
                ('area', models.CharField(max_length=50, verbose_name='Area')),
                ('contact1', models.CharField(max_length=50, verbose_name='Phone')),
                ('contact2', models.CharField(max_length=50, verbose_name='Fax')),
                ('email', models.EmailField(max_length=254, verbose_name='Email')),
                ('applicant_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.applicant', verbose_name='')),
                ('user_id', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='')),
            ],
            options={
                'verbose_name': 'Organization',
                'verbose_name_plural': 'Organizations',
            },
        ),
        migrations.CreateModel(
            name='Application',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('app_no', models.CharField(max_length=50, verbose_name='Application No')),
                ('app_date', models.DateField(verbose_name='Application Date')),
                ('app_type', models.CharField(choices=[('new', 'New'), ('renew', 'Renew'), ('modify', 'Modify'), ('license_cancel', 'License Cancellation')], max_length=50, verbose_name='Application Type')),
                ('app_status', models.CharField(default='Draft', max_length=50, verbose_name='Status')),
                ('activty_type', models.CharField(choices=[('demostic', 'Demostic Labour Employment'), ('foreign', 'Foreign Labour Employement'), ('local', 'Bahraini Labour Employment')], max_length=50, verbose_name='Activity Type')),
                ('financial_guarantee', models.CharField(choices=[('manager_cheque', 'Manager Cheque'), ('bank_guarantee', 'Bank Guarantee')], max_length=50, verbose_name='Financial Guarantee')),
                ('financial_guarantee_expiry_date', models.DateField(verbose_name='Financial Guarantee Expiry Date')),
                ('cert1_doc', models.FileField(default='', upload_to='doc_library', verbose_name='MOIS Cert')),
                ('cert2_doc', models.FileField(default='', upload_to='doc_library', verbose_name='MOH Cert')),
                ('cert3_doc', models.FileField(default='', upload_to='doc_library', verbose_name='MOL Cert')),
                ('cr_rent_doc', models.FileField(blank=True, null=True, upload_to='doc_library', verbose_name='CR Rental Agreement Doc')),
                ('fh_rent_doc', models.FileField(blank=True, null=True, upload_to='doc_library', verbose_name='Temp FH Rental Agreement Doc')),
                ('cr_ewa_bill_doc', models.FileField(blank=True, null=True, upload_to='doc_library', verbose_name='CR EWA Bill Doc')),
                ('fh_ewa_bill_doc', models.FileField(blank=True, null=True, upload_to='doc_library', verbose_name='Temp FH EWA Bill Doc')),
                ('employment_office_receipt', models.FileField(blank=True, null=True, upload_to='doc_library', verbose_name='Employment Office Receipt')),
                ('org_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.organization', verbose_name='Organization Name')),
                ('user_id', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='')),
            ],
            options={
                'verbose_name': 'Application',
                'verbose_name_plural': 'Application',
            },
        ),
    ]
