# Generated by Django 3.1.4 on 2021-01-24 09:47

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Roles',
            fields=[
                ('role_id', models.IntegerField(primary_key=True, serialize=False)),
                ('role', models.CharField(max_length=20, unique=True)),
                ('description', models.CharField(max_length=100)),
                ('last_update', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'verbose_name_plural': 'Roles',
            },
        ),
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('EmpId', models.IntegerField(primary_key=True, serialize=False)),
                ('first_name', models.CharField(max_length=45)),
                ('last_name', models.CharField(max_length=45)),
                ('marital_status', models.CharField(choices=[('MR', 'Married'), ('SN', 'Single'), ('DI', 'Divorced'), ('WI', 'Widowed')], max_length=15)),
                ('phone_number', models.IntegerField()),
                ('address', models.CharField(max_length=50)),
                ('gender', models.CharField(choices=[('M', 'male'), ('F', 'female')], max_length=10)),
                ('date_of_birth', models.DateField()),
                ('date_of_joining', models.DateField()),
                ('date_of_leaving', models.DateField(blank=True)),
                ('last_update', models.DateField(auto_now_add=True)),
                ('manager_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='employee', to='employee.employee')),
                ('role_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='employee.roles')),
            ],
        ),
    ]
