# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2018-04-19 23:15
from __future__ import unicode_literals

from django.conf import settings
import django.core.files.storage
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import phonenumber_field.modelfields
import tinymce.models


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='ApplicationScore',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('performance', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='DocumentUpload',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file_upload', models.FileField(storage=django.core.files.storage.FileSystemStorage(location='C:\\Users\\dan36\\Desktop\\2018-ca400-osulld42\\src\\jobanalytics\\backend\\media\\cvs'), upload_to='', validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['docx'])])),
            ],
        ),
        migrations.CreateModel(
            name='JobPosting',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('job_title', models.CharField(max_length=500)),
                ('employer', models.CharField(max_length=500)),
                ('address_line_1', models.CharField(max_length=1024)),
                ('address_line_2', models.CharField(blank=True, max_length=1024, null=True)),
                ('city', models.CharField(max_length=1024, verbose_name='City/Town')),
                ('county', models.CharField(max_length=1024)),
                ('employer_logo', models.FileField(default='logos/default.png', upload_to='logos/', validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['jpg', 'png'])])),
                ('job_description', tinymce.models.HTMLField()),
                ('user', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='MatchedRequirement',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('matched', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Requirement',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('requirement_detail', models.CharField(max_length=150)),
                ('requirement_type', models.CharField(choices=[('0', 'Skill Requirement'), ('1', 'Experience Requirement'), ('2', 'Education Requirement')], default=0, max_length=20)),
                ('requirement_keyword', models.CharField(max_length=50)),
                ('job', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='frontend.JobPosting')),
            ],
        ),
        migrations.CreateModel(
            name='UserApplication',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=30)),
                ('last_name', models.CharField(max_length=40)),
                ('email', models.EmailField(max_length=70)),
                ('phone_number', phonenumber_field.modelfields.PhoneNumberField(max_length=128)),
                ('curriculum_vitae', models.FileField(storage=django.core.files.storage.FileSystemStorage(location='C:\\Users\\dan36\\Desktop\\2018-ca400-osulld42\\src\\jobanalytics\\backend\\media\\cvs'), upload_to='', validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['docx'])])),
                ('satisfaction_level', models.IntegerField(default=5, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(10)])),
                ('number_of_projects', models.IntegerField(default=1, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(20)])),
                ('average_salary', models.CharField(choices=[('low', 'Less than or equal to 30,000 annually'), ('medium', 'Between 30,000 and 40,000 annually'), ('high', 'More than 40,000 annually')], default='medium', max_length=50)),
                ('work_accident', models.CharField(choices=[('1', 'Yes'), ('0', 'No')], default='0', max_length=10)),
                ('promotion_in_last_5_years', models.CharField(choices=[('1', 'Yes'), ('0', 'No')], default='0', max_length=10)),
                ('average_monthly_hours', models.IntegerField()),
                ('time_spent_at_company', models.IntegerField()),
                ('job', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='frontend.JobPosting')),
            ],
        ),
        migrations.AddField(
            model_name='matchedrequirement',
            name='application',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='application', to='frontend.UserApplication'),
        ),
        migrations.AddField(
            model_name='matchedrequirement',
            name='requirement',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='requirement', to='frontend.Requirement'),
        ),
        migrations.AddField(
            model_name='applicationscore',
            name='application',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='frontend.UserApplication'),
        ),
    ]
