# Generated by Django 2.2 on 2021-05-01 06:13

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Department',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('departmentID', models.PositiveIntegerField()),
                ('departmentName', models.CharField(max_length=50)),
                ('departmentDate', models.DateTimeField(default=django.utils.timezone.now)),
            ],
        ),
        migrations.CreateModel(
            name='Salary',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('salaryID', models.PositiveIntegerField()),
                ('salaryAmount', models.PositiveIntegerField()),
                ('salaryDate', models.DateTimeField(default=django.utils.timezone.now)),
            ],
        ),
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('designation', models.CharField(max_length=30)),
                ('profilepic', models.ImageField(upload_to='')),
                ('usertype', models.CharField(choices=[('EMP', 'Employee'), ('MAN', 'MANAGER'), ('SUP', 'Superuser')], default='EMP', max_length=3)),
                ('gender', models.CharField(choices=[('M', 'Male'), ('F', 'Female'), ('O', 'Others')], default='M', max_length=1)),
                ('address', models.TextField()),
                ('departmentid', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='employ.Department')),
                ('salaryid', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='employ.Salary')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
