# Generated by Django 3.1.7 on 2021-05-29 06:38

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Designation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('role', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Empdetails',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('employeeid', models.CharField(max_length=40)),
                ('experience', models.CharField(max_length=10)),
                ('salary', models.IntegerField()),
                ('profile_pic', models.ImageField(upload_to='', verbose_name='pictures/')),
                ('mobile', models.IntegerField()),
                ('age', models.IntegerField()),
                ('address', models.CharField(max_length=100)),
                ('designation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='WebApp.designation')),
            ],
        ),
        migrations.CreateModel(
            name='Team',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('team_name', models.CharField(max_length=100)),
                ('team_lead', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='WebApp.empdetails')),
                ('team_members', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='team_members', to='WebApp.empdetails')),
            ],
        ),
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('project_name', models.CharField(max_length=100)),
                ('teamname', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='WebApp.team')),
            ],
        ),
        migrations.CreateModel(
            name='Mailinbox',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('subject', models.TextField(max_length=100)),
                ('body', models.TextField(max_length=200)),
                ('file', models.FileField(blank=True, null=True, upload_to='media/')),
                ('receiver', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='receiver', to='WebApp.empdetails')),
                ('sender', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='senders', to='WebApp.empdetails')),
            ],
        ),
        migrations.CreateModel(
            name='Empregistration',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('course', models.CharField(choices=[('B.Tech', 'Bachelor of technology'), ('MBA', 'Master of bussiness Administration'), ('MCA', 'Master of computer Applications'), ('DEGREE', 'B.com computers'), ('CA', 'Charted Accountant')], default=None, max_length=10)),
                ('qualification', models.CharField(max_length=100)),
                ('gender', models.CharField(choices=[('M', 'Male'), ('F', 'Female'), ('O', 'Others')], default=None, max_length=1)),
                ('is_approved', models.BooleanField(default=False)),
                ('designation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='WebApp.designation')),
            ],
        ),
        migrations.AddField(
            model_name='empdetails',
            name='empname',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='employee', to='WebApp.empregistration'),
        ),
        migrations.AddField(
            model_name='empdetails',
            name='user',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='emp_info', to=settings.AUTH_USER_MODEL),
        ),
    ]
