# Generated by Django 4.1.3 on 2022-11-05 14:47

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Department',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64)),
            ],
        ),
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=64)),
                ('last_name', models.CharField(max_length=64)),
                ('position', models.CharField(max_length=200)),
                ('salary', models.IntegerField()),
                ('age', models.IntegerField()),
                ('department', models.ForeignKey(default='unassigned', on_delete=django.db.models.deletion.SET_DEFAULT, related_name='members', to='employees.department')),
            ],
        ),
        migrations.AddField(
            model_name='department',
            name='chief',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dept_headed', to='employees.employee'),
        ),
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('departments', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='company', to='employees.department')),
            ],
        ),
    ]
