# Generated by Django 4.0 on 2022-09-15 14:49

import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import settings_app.upload_utils


class Migration(migrations.Migration):

    dependencies = [
        ('custom', '0004_remove_area_study_program_delete_faculty_delete_area_and_more'),
        ('auth', '0012_alter_user_first_name_max_length'),
        ('employee', '0001_initial'),
        ('contract', '0002_rename_section_contract_department_and_more'),
    ]

    operations = [
        migrations.RenameField(
            model_name='empplacement',
            old_name='end_reason',
            new_name='reason',
        ),
        migrations.AddField(
            model_name='contract',
            name='datetime',
            field=models.DateTimeField(null=True),
        ),
        migrations.AddField(
            model_name='contract',
            name='reason',
            field=models.CharField(blank=True, max_length=200, null=True),
        ),
        migrations.AddField(
            model_name='empplacement',
            name='terminate_date',
            field=models.DateField(blank=True, null=True),
        ),
        migrations.CreateModel(
            name='EmpPosition',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('disp_number', models.CharField(blank=True, max_length=50, null=True, verbose_name='Dispatch Number')),
                ('start_date', models.DateField(blank=True, null=True)),
                ('end_date', models.DateField(blank=True, null=True)),
                ('terminate_date', models.DateField(blank=True, null=True)),
                ('reason', models.CharField(blank=True, max_length=200, null=True)),
                ('file', models.FileField(blank=True, null=True, upload_to=settings_app.upload_utils.upload_position, validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['pdf'])], verbose_name='Attachment')),
                ('is_active', models.BooleanField(default=True)),
                ('is_confirm', models.BooleanField(default=False)),
                ('datetime', models.DateTimeField(null=True)),
                ('hashed', models.CharField(max_length=32, null=True)),
                ('de', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='empposition', to='custom.de')),
                ('department', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='empposition', to='custom.department')),
                ('employee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='empposition', to='employee.employee')),
                ('position', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='empposition', to='custom.position')),
                ('unit', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='empposition', to='custom.unit')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='auth.user')),
            ],
        ),
    ]
