# Generated by Django 2.2.3 on 2019-07-17 08:01

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


class Migration(migrations.Migration):
    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Article',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50, verbose_name='Название')),
                ('content', models.TextField(blank=True, verbose_name='Контент')),
                ('content_min', models.TextField(blank=True, max_length=300, verbose_name='Миниверсия статьи')),
                ('release_date', models.DateField(auto_now=True, verbose_name='Дата выпуска статьи')),
            ],
            options={
                'verbose_name': 'Статья',
                'verbose_name_plural': 'Статьи',
                'db_table': 'articles',
                'ordering': ['release_date'],
            },
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50, verbose_name='Название')),
                ('content', models.TextField(blank=True, max_length=200, null=True, verbose_name='Контент')),
                ('start_date', models.DateField(verbose_name='Дата начала мероприятия')),
                ('duration', models.CharField(blank=True, max_length=20, null=True, verbose_name='Длительность')),
                ('type', models.CharField(
                    choices=[('common', 'Обучение для всех'), ('prof', 'Обучение для профессионалов'),
                             ('personal', 'Программы личностного роста'),
                             ('university', 'Базовое психологическое образование в хгак')], default='common',
                    max_length=20)),
            ],
            options={
                'verbose_name': 'Мероприятие',
                'verbose_name_plural': 'Мероприятия',
                'db_table': 'events',
            },
        ),
        migrations.CreateModel(
            name='Person',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('full_name', models.CharField(max_length=50, verbose_name='Полное имя')),
                ('name', models.CharField(max_length=20, unique=True, verbose_name='Имя')),
                ('birth_date', models.DateField(verbose_name='Дата рождения')),
                ('email', models.EmailField(max_length=254)),
                ('info', models.TextField(blank=True, verbose_name='Основная информация')),
                ('bio', models.TextField(blank=True, verbose_name='Биография')),
                ('photo', models.FilePathField(blank=True, null=True,
                                               path='/home/gda2048/Desktop/PhychoBlog/psycho/static/images',
                                               verbose_name='Фотография')),
                ('password', models.CharField(max_length=50, verbose_name='Пароль')),
                ('user', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE,
                                              related_name='profile', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Специалист',
                'verbose_name_plural': 'Специалисты',
                'db_table': 'people',
            },
        ),
        migrations.CreateModel(
            name='HelpItem',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50, verbose_name='Название')),
                ('description', models.TextField(max_length=200, verbose_name='Описание')),
                ('expert', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Person',
                                             verbose_name='Эксперт')),
            ],
            options={
                'verbose_name': 'Пункт помощи',
                'verbose_name_plural': 'Пункты помощи',
                'db_table': 'help',
            },
        ),
        migrations.CreateModel(
            name='ArticlePhotoReport',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('alt', models.CharField(blank=True, max_length=200, verbose_name='Описание')),
                ('height', models.PositiveIntegerField(blank=True, null=True)),
                ('width', models.PositiveIntegerField(blank=True, null=True)),
                ('photo', models.ImageField(height_field='height', null=True, upload_to='', verbose_name='Изображение',
                                            width_field='width')),
                ('announcement', models.BooleanField(default=False, verbose_name='Добавить в анонсы')),
                ('article',
                 models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='main.Article',
                                   verbose_name='Статья')),
            ],
            options={
                'verbose_name': 'Фото для статьи',
                'verbose_name_plural': 'Фото для статьи',
                'db_table': 'photos',
            },
        ),
        migrations.AddField(
            model_name='article',
            name='author',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Person',
                                    verbose_name='Автор'),
        ),
        migrations.CreateModel(
            name='Announcement',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50, verbose_name='Название')),
                ('content', models.TextField(blank=True, max_length=200, verbose_name='Контент')),
                ('date', models.DateField(verbose_name='Дата события')),
                ('main', models.BooleanField(default=False, verbose_name='Отображать вверху')),
                ('article', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Article',
                                              verbose_name='Мероприятие')),
            ],
            options={
                'verbose_name': 'Анонс',
                'verbose_name_plural': 'Анонсы',
                'db_table': 'announcements',
                'ordering': ['date'],
            },
        ),
        migrations.CreateModel(
            name='Achievement',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('alt', models.CharField(blank=True, max_length=200, verbose_name='Описание')),
                ('height', models.PositiveIntegerField(blank=True, null=True)),
                ('width', models.PositiveIntegerField(blank=True, null=True)),
                ('photo', models.ImageField(height_field='height', null=True, upload_to='', verbose_name='Изображение',
                                            width_field='width')),
                ('priority', models.IntegerField(default=2, verbose_name='Приоритет')),
                ('expert', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Person',
                                             verbose_name='Эксперт')),
            ],
            options={
                'verbose_name': 'Достижение',
                'verbose_name_plural': 'Достижения',
                'db_table': 'achievements',
            },
        ),
    ]
