# Generated by Django 3.0.3 on 2020-09-10 16:30

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='CategoryToCompany',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='CategoryToSalary',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='MainCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='SubCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('image', models.URLField(max_length=3000, null=True)),
                ('main_category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.MainCategory')),
            ],
        ),
        migrations.CreateModel(
            name='Salary',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('year', models.PositiveSmallIntegerField()),
                ('payroll', models.IntegerField()),
                ('category', models.ManyToManyField(through='company.CategoryToSalary', to='company.SubCategory')),
            ],
        ),
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('field', models.CharField(max_length=100)),
                ('logo_url', models.URLField(max_length=2000)),
                ('is_premium', models.BooleanField(default=False)),
                ('banner_url', models.CharField(max_length=2000, null=True)),
                ('sub_category', models.ManyToManyField(through='company.CategoryToCompany', to='company.SubCategory')),
            ],
        ),
        migrations.AddField(
            model_name='categorytosalary',
            name='category',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.SubCategory'),
        ),
        migrations.AddField(
            model_name='categorytosalary',
            name='salary',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.Salary'),
        ),
        migrations.AddField(
            model_name='categorytocompany',
            name='category',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.SubCategory'),
        ),
        migrations.AddField(
            model_name='categorytocompany',
            name='company',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.Company'),
        ),
    ]
