# Generated by Django 2.1 on 2018-08-05 13:04

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='created at')),
                ('label', models.CharField(max_length=50, primary_key=True, serialize=False, verbose_name='Label')),
            ],
            options={
                'verbose_name': 'Habr Category',
                'verbose_name_plural': 'Habr Categories',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='Creator',
            fields=[
                ('created_at', models.DateTimeField(auto_now=True, verbose_name='created at')),
                ('name', models.CharField(max_length=50, primary_key=True, serialize=False, unique=True, verbose_name='User name')),
            ],
            options={
                'verbose_name': 'Habr Author',
                'verbose_name_plural': 'Habr Authors',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.CharField(max_length=9, verbose_name='harb id')),
                ('title', models.CharField(max_length=255, verbose_name='Post title')),
                ('guid', models.URLField(max_length=64, primary_key=True, serialize=False, verbose_name='Post guid link')),
                ('link', models.URLField(max_length=255, verbose_name='Post link')),
                ('description', models.TextField(max_length=2000, verbose_name='Description')),
                ('pub_date', models.DateTimeField(verbose_name='published at')),
                ('category', models.ManyToManyField(to='target_habr.Category', verbose_name='Category')),
                ('creator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='target_habr.Creator', verbose_name='Creator')),
            ],
            options={
                'verbose_name': 'Habr Post',
                'verbose_name_plural': 'Habr Posts',
                'managed': True,
            },
        ),
    ]
