# Generated by Django 3.2.5 on 2021-08-19 09:40

from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import django_extensions.db.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('skills', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('django_celery_beat', '0015_edit_solarschedule_events_choices'),
    ]

    operations = [
        migrations.CreateModel(
            name='Startup',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')),
                ('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')),
                ('status', models.CharField(choices=[('open', 'Open'), ('in progress', 'In progress'), ('finished', 'Finished'), ('closed', 'Closed'), ('archived', 'In Archive')], default='open', help_text='Startup status: open, in progress, finished, closed, archived', max_length=64, verbose_name='Status')),
                ('title', models.CharField(help_text='Startup Title', max_length=64, unique=True, verbose_name='Title')),
                ('slug', django_extensions.db.fields.AutoSlugField(blank=True, editable=False, populate_from=['title'])),
                ('text', models.TextField(help_text='Info about startup', max_length=2048, verbose_name='Text')),
                ('start_date', models.DateTimeField(auto_now_add=True, help_text='Date when startup starts', verbose_name='Start Date')),
                ('end_date', models.DateTimeField(help_text='Date when startup ends', validators=[django.core.validators.MinValueValidator(django.utils.timezone.now)], verbose_name='End Date')),
                ('owner', models.ForeignKey(help_text="Startup's owner", on_delete=django.db.models.deletion.CASCADE, related_name='startups', to=settings.AUTH_USER_MODEL, verbose_name='Owner')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Vacancy',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')),
                ('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')),
                ('status', models.CharField(choices=[('open', 'Open'), ('closed', 'Closed'), ('archived', 'In Archive')], default='open', help_text='Vacancy status: open, closed, archived', max_length=64, verbose_name='Status')),
                ('title', models.CharField(help_text='Vacancy Title', max_length=64, verbose_name='Title')),
                ('description', models.TextField(help_text='Info about vacancy', verbose_name='Description')),
                ('skills', models.ManyToManyField(help_text='Required skills for this vacancy.', to='skills.Skill', verbose_name='Skill')),
                ('startup', models.ForeignKey(help_text="Vacancy's startup", on_delete=django.db.models.deletion.DO_NOTHING, related_name='vacancies', to='startups.startup', verbose_name='Startup')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')),
                ('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')),
                ('user', models.ForeignKey(help_text='Employee in the Startup is User', on_delete=django.db.models.deletion.CASCADE, related_name='jobs', to=settings.AUTH_USER_MODEL, verbose_name='User')),
                ('vacancy', models.ForeignKey(help_text="Employee's vacancy", on_delete=django.db.models.deletion.CASCADE, related_name='employees', to='startups.vacancy', verbose_name='Vacancy')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Request',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')),
                ('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')),
                ('status', models.CharField(choices=[('open', 'Under Consideration'), ('in progress', 'Rejected'), ('archived', 'In archive')], default='open', help_text='Request status: under consideration, rejected, archived', max_length=64, verbose_name='Status')),
                ('message', models.TextField(help_text='Request message', verbose_name='Message')),
                ('user', models.ForeignKey(help_text="Request's User", on_delete=django.db.models.deletion.DO_NOTHING, related_name='requests', to=settings.AUTH_USER_MODEL, verbose_name='User')),
                ('vacancy', models.ForeignKey(help_text="Request's vacancy", on_delete=django.db.models.deletion.DO_NOTHING, related_name='requests', to='startups.vacancy', verbose_name='Vacancy')),
            ],
            options={
                'unique_together': {('user', 'vacancy')},
            },
        ),
    ]
