# Generated by Django 2.1.1 on 2019-02-13 13:06

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Author',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=50)),
                ('description', models.TextField(default='')),
                ('photo', models.ImageField(default='/problems/static/problems/placeholder.jpg', upload_to='')),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('author_name', models.CharField(default='', max_length=50)),
                ('date', models.DateTimeField(default=django.utils.timezone.now)),
                ('text', models.TextField(default='')),
                ('author', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=50)),
                ('description', models.TextField(default='')),
            ],
        ),
        migrations.CreateModel(
            name='Problem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='', max_length=50)),
                ('text', models.TextField(default='')),
                ('complexity', models.IntegerField(default=0)),
                ('solution', models.TextField(default='')),
                ('year', models.IntegerField(default=0)),
                ('max_level', models.IntegerField(default=1, validators=[django.core.validators.MaxValueValidator(11), django.core.validators.MinValueValidator(1)])),
                ('min_level', models.IntegerField(default=1, validators=[django.core.validators.MaxValueValidator(11), django.core.validators.MinValueValidator(1)])),
                ('is_solved', models.BooleanField(default=False)),
                ('rating', models.IntegerField(default=0)),
                ('liked_users', models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Theme',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=50)),
                ('description', models.TextField(default='')),
                ('problems', models.ManyToManyField(to='problems.Problem')),
            ],
        ),
        migrations.AddField(
            model_name='event',
            name='problems',
            field=models.ManyToManyField(to='problems.Problem'),
        ),
        migrations.AddField(
            model_name='comment',
            name='problem',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='problems.Problem'),
        ),
        migrations.AddField(
            model_name='author',
            name='problems',
            field=models.ManyToManyField(to='problems.Problem'),
        ),
    ]

# Generated by Django 2.1.1 on 2019-02-13 13:06

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Author',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=50)),
                ('description', models.TextField(default='')),
                ('photo', models.ImageField(default='/problems/static/problems/placeholder.jpg', upload_to='')),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('author_name', models.CharField(default='', max_length=50)),
                ('date', models.DateTimeField(default=django.utils.timezone.now)),
                ('text', models.TextField(default='')),
                ('author', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=50)),
                ('description', models.TextField(default='')),
            ],
        ),
        migrations.CreateModel(
            name='Problem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='', max_length=50)),
                ('text', models.TextField(default='')),
                ('complexity', models.IntegerField(default=0)),
                ('solution', models.TextField(default='')),
                ('year', models.IntegerField(default=0)),
                ('max_level', models.IntegerField(default=1, validators=[django.core.validators.MaxValueValidator(11), django.core.validators.MinValueValidator(1)])),
                ('min_level', models.IntegerField(default=1, validators=[django.core.validators.MaxValueValidator(11), django.core.validators.MinValueValidator(1)])),
                ('is_solved', models.BooleanField(default=False)),
                ('rating', models.IntegerField(default=0)),
                ('liked_users', models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Theme',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=50)),
                ('description', models.TextField(default='')),
                ('problems', models.ManyToManyField(to='problems.Problem')),
            ],
        ),
        migrations.AddField(
            model_name='event',
            name='problems',
            field=models.ManyToManyField(to='problems.Problem'),
        ),
        migrations.AddField(
            model_name='comment',
            name='problem',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='problems.Problem'),
        ),
        migrations.AddField(
            model_name='author',
            name='problems',
            field=models.ManyToManyField(to='problems.Problem'),
        ),
    ]

# Generated by Django 2.1.1 on 2019-02-13 13:06