# Generated by Django 3.0.6 on 2020-05-23 22:50

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('category_no', models.IntegerField(primary_key=True, serialize=False, verbose_name='Номер категории')),
                ('name', models.CharField(max_length=50, verbose_name='Название категории')),
            ],
            options={
                'verbose_name': 'Категория',
                'verbose_name_plural': 'Категории',
            },
        ),
        migrations.CreateModel(
            name='Article',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('article_image', models.ImageField(default='img/default/default.jpg', upload_to='img/articles')),
                ('article_title', models.CharField(max_length=200, verbose_name='Название статьи')),
                ('article_description', models.CharField(max_length=450, verbose_name='Краткое описание статьи')),
                ('article_text', models.TextField(verbose_name='Текст статьи')),
                ('pub_date', models.DateTimeField(verbose_name='Дата публикации')),
                ('is_main_article', models.BooleanField(default=False)),
                ('author_name', models.CharField(default='No name', max_length=50, verbose_name='Логин автора')),
                ('likes', models.IntegerField(default=0)),
                ('category', models.ForeignKey(db_column='category_no', default=0, on_delete=django.db.models.deletion.SET_DEFAULT, to='main_app.Category')),
            ],
            options={
                'verbose_name': 'Статья',
                'verbose_name_plural': 'Статьи',
            },
        ),
    ]
