# Generated by Django 2.1.4 on 2019-01-08 10:06

import django.utils.timezone
from django.db import migrations, models


class Migration(migrations.Migration):
    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='BusinessEntity',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('be_Code', models.CharField(blank=True, max_length=10, null=True, unique=True)),
                ('libelle', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=200)),
                ('last_name', models.CharField(max_length=200)),
                ('cin_code', models.CharField(max_length=10, unique=True)),
                ('birth_date', models.DateField()),
                ('hire_date', models.DateField()),
                ('email', models.EmailField(max_length=100, unique=True)),
                ('cnss_code', models.CharField(max_length=30, unique=True)),
                ('experience_years_number', models.IntegerField(default=0)),
                ('created_at', models.DateTimeField(blank=True, default=django.utils.timezone.now)),
                ('be', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL,
                                         to='leaveManagementApp.BusinessEntity')),
                ('manager', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL,
                                              to='leaveManagementApp.Employee')),
            ],
        ),
        migrations.CreateModel(
            name='Leave',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('leave_code', models.CharField(blank=True, max_length=10, null=True, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='LeaveRequest',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('leave_request_code', models.CharField(blank=True, max_length=10, null=True, unique=True)),
                ('employee',
                 models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='Employee',
                                   to='leaveManagementApp.Employee')),
                ('manager',
                 models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='Manager',
                                   to='leaveManagementApp.Employee')),
            ],
        ),
        migrations.CreateModel(
            name='LeaveType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('LeaveTypeCode', models.CharField(blank=True, max_length=10, null=True, unique=True)),
                ('libelle', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Position',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('position_code', models.CharField(blank=True, max_length=10, null=True, unique=True)),
                ('libelle', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Team',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('team_code', models.CharField(blank=True, max_length=10, null=True, unique=True)),
                ('libelle', models.CharField(max_length=200)),
            ],
        ),
        migrations.AddField(
            model_name='leave',
            name='leave_request',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL,
                                    to='leaveManagementApp.LeaveRequest'),
        ),
        migrations.AddField(
            model_name='leave',
            name='leave_type',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL,
                                    to='leaveManagementApp.LeaveType'),
        ),
        migrations.AddField(
            model_name='employee',
            name='positon',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL,
                                    to='leaveManagementApp.Position'),
        ),
        migrations.AddField(
            model_name='employee',
            name='team',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL,
                                    to='leaveManagementApp.Team'),
        ),
    ]
