# Generated by Django 3.0.2 on 2020-01-17 01:49

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('vacation', '0003_auto_20200114_0725'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='VacationHistory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_start', models.DateField(verbose_name='Дата начала отпуска')),
                ('date_end', models.DateField(verbose_name='Дата окончания отпуска')),
                ('actual', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='history_vacations', to='vacation.Vacation', verbose_name='Активный отпуск')),
                ('employee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Сотрудник')),
                ('previous', models.OneToOneField(null=True, on_delete=django.db.models.deletion.PROTECT, to='vacation_history.VacationHistory', verbose_name='Предыдущий отпуск')),
            ],
            options={
                'verbose_name': 'Перенесенный отпуск',
                'verbose_name_plural': 'Переносы отпусков',
            },
        ),
    ]
