# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-11-21 13:37
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('storage', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.TextField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('deleted_at', models.DateTimeField(auto_now=True, null=True)),
                ('status', models.CharField(choices=[('public', 'Public'), ('review', 'Review'), ('flagged', 'Flagged')], default='public', max_length=30)),
            ],
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=300, null=True)),
                ('content', models.TextField(blank=True, null=True)),
                ('excerpt', models.CharField(blank=True, max_length=500, null=True)),
                ('visibility', models.CharField(choices=[('public', 'Public'), ('protected', 'Protected'), ('private', 'Private')], default='public', max_length=10)),
                ('password', models.CharField(blank=True, max_length=128, null=True)),
                ('is_draft', models.BooleanField(default=False)),
                ('is_sticky', models.BooleanField(default=False)),
                ('is_in_trash', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True, null=True)),
                ('deleted_at', models.DateTimeField(blank=True, default=None, null=True)),
                ('author', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
                ('featured_image', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, to='storage.Medium')),
            ],
            bases=(common.mixins.ModelTagnamesMixin, models.Model),
        ),
        migrations.AddField(
            model_name='comment',
            name='post',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='blog.Post'),
        ),
        migrations.AddField(
            model_name='comment',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
