# Generated by Django 2.2.2 on 2019-06-05 00:21

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='CategoryModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=150, unique=True)),
                ('description', models.CharField(max_length=1000)),
            ],
            options={
                'db_table': 'categories',
            },
        ),
        migrations.CreateModel(
            name='PostModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=350)),
                ('slug', models.CharField(max_length=700)),
                ('status', models.IntegerField(choices=[(2, 'Approved'), (1, 'Disapproved'), (0, 'Trash')])),
                ('date_posted', models.DateTimeField(auto_now_add=True)),
                ('views', models.BigIntegerField(default=0)),
                ('flag', models.CharField(choices=[('N', 'Normal Post'), ('F', 'Front Page Post')], default='N', max_length=1)),
                ('flag_raised_on', models.DateTimeField(auto_now=True)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.LoginModel')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='post.CategoryModel')),
            ],
            options={
                'db_table': 'posts',
            },
            managers=[
                ('manage', django.db.models.manager.Manager()),
            ],
        ),
    ]
