# Generated by Django 3.2.4 on 2021-06-14 18:49

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('phoneNumber', models.CharField(max_length=11)),
                ('role', models.CharField(choices=[('1', 'Ментор'), ('2', 'Капитан'), ('3', 'Жюри'), ('4', 'Администратор')], max_length=1)),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('first_name', models.TextField(max_length=25)),
                ('last_name', models.TextField(max_length=25)),
                ('username', models.CharField(blank=True, max_length=150, null=True)),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Issue',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=75)),
                ('condition', models.CharField(max_length=5000)),
                ('dateCreate', models.DateField()),
                ('limits', models.CharField(default='нет', max_length=550)),
                ('links', models.CharField(blank=True, max_length=450)),
                ('consultation', models.CharField(blank=True, max_length=75)),
                ('mentor', models.ForeignKey(default='None', on_delete=django.db.models.deletion.CASCADE, related_name='issues', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Solution',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('pubDate', models.DateField()),
                ('score', models.FloatField(max_length=2)),
                ('comment', models.CharField(max_length=250)),
                ('solutionLink', models.CharField(default='None', max_length=250)),
                ('issue', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='solutions', to='hack.issue')),
                ('jury', models.ForeignKey(default='None', on_delete=django.db.models.deletion.CASCADE, related_name='solutions', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Team',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('teamName', models.CharField(max_length=100)),
                ('motto', models.CharField(max_length=350)),
                ('captain', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='teams', to=settings.AUTH_USER_MODEL)),
                ('issue', models.ManyToManyField(related_name='issue_solution', through='hack.Solution', to='hack.Issue')),
            ],
        ),
        migrations.CreateModel(
            name='TeamMember',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fio', models.CharField(max_length=100)),
                ('phoneNumber', models.CharField(max_length=11)),
                ('role', models.CharField(choices=[('1', 'Developer'), ('2', 'Designer'), ('3', 'Entrepreneur')], max_length=1)),
                ('team', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='team_members', to='hack.team')),
            ],
        ),
        migrations.AddField(
            model_name='solution',
            name='team',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='solutions', to='hack.team'),
        ),
    ]
