# Generated by Django 3.0.5 on 2020-05-20 15:47

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('article', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Classification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='Название')),
                ('visibility', models.BooleanField(default=True, verbose_name='Видимость на сайте')),
                ('date_of_delete', models.DateField(blank=True, verbose_name='Дата удаления')),
            ],
            options={
                'verbose_name': 'Классификация',
                'verbose_name_plural': 'Классификации',
            },
        ),
        migrations.CreateModel(
            name='Software',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, verbose_name='Наименование ПО')),
                ('price', models.FloatField(blank=True, validators=[django.core.validators.MinValueValidator(0)], verbose_name='Цена')),
                ('is_free', models.BooleanField(db_index=True, default=True, verbose_name='Бесплатно/Платно')),
                ('description', models.TextField(verbose_name='Описание')),
                ('description_medium', models.TextField(max_length=400, verbose_name='Среднее описание')),
                ('description_small', models.TextField(max_length=50, verbose_name='Короткое описание')),
                ('visibility', models.BooleanField(db_index=True, default=True, verbose_name='Видимость на сайте')),
                ('modification', models.BooleanField(default=True, verbose_name='Возможность доработки')),
                ('size', models.FloatField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(0)], verbose_name='Размер')),
                ('date_of_delete', models.CharField(blank=True, db_index=True, max_length=20, null=True, verbose_name='Дата удаления')),
            ],
            options={
                'verbose_name': 'ПО',
                'verbose_name_plural': 'Каталог',
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, null=True, verbose_name='Название')),
                ('description', models.TextField(blank=True, verbose_name='Описание')),
                ('visibility', models.BooleanField(db_index=True, default=True, verbose_name='Видимость на сайте')),
                ('date_of_delete', models.DateField(blank=True, verbose_name='Дата удаления')),
                ('articles', models.ManyToManyField(to='article.Article')),
                ('softwares', models.ManyToManyField(to='software.Software')),
            ],
            options={
                'verbose_name': 'Тег',
                'verbose_name_plural': 'Теги',
            },
        ),
        migrations.CreateModel(
            name='Classification_Value',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('value', models.CharField(max_length=200, verbose_name='Значение классификации')),
                ('visibility', models.BooleanField(db_index=True, default=True, verbose_name='Видимость на сайте')),
                ('classification', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='software.Classification', verbose_name='Классификация')),
                ('softwares', models.ManyToManyField(to='software.Software')),
            ],
            options={
                'verbose_name': 'Классификация_значение',
                'verbose_name_plural': 'Классификация_значение',
            },
        ),
        migrations.CreateModel(
            name='Addition',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, null=True, verbose_name='Название')),
                ('kind', models.BooleanField(default=True, verbose_name='Тип (true - картинка)')),
                ('size', models.BooleanField(default=True, verbose_name='Тип (true - большая картинка)')),
                ('photo', models.ImageField(upload_to='soft/', verbose_name='Фото')),
                ('is_main', models.BooleanField(default=False, verbose_name='Тип (true - главная)')),
                ('date_of_delete', models.DateField(blank=True, db_index=True, null=True, verbose_name='Дата удаления')),
                ('software', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='software.Software', verbose_name='ПО')),
            ],
            options={
                'verbose_name': 'Приложение',
                'verbose_name_plural': 'Приложения',
            },
        ),
    ]
