# Generated by Django 2.2.3 on 2020-01-19 12:56

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Departments',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dep_name', models.CharField(db_index=True, max_length=150, unique=True)),
                ('need_emp', models.BooleanField(default=False)),
                ('dep_need', models.IntegerField(blank=True, default=0)),
                ('created', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'verbose_name': 'Department',
                'verbose_name_plural': 'Departments',
                'ordering': ('dep_name',),
            },
        ),
        migrations.CreateModel(
            name='Employees',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('emp_name', models.CharField(max_length=150)),
                ('emp_code', models.CharField(max_length=150)),
                ('national_id', models.IntegerField(default=0)),
                ('active', models.BooleanField(default=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('leave', models.DateTimeField(blank=True, default=None, null=True)),
                ('dep', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='employee', to='employees.Departments')),
            ],
            options={
                'verbose_name': 'Employee',
                'verbose_name_plural': 'Employees',
                'ordering': ('dep',),
            },
        ),
    ]
