# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2017-01-10 15:11
from __future__ import unicode_literals

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),
        ('field_trans', '0001_initial'),
        ('microfeed2', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Page',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('title', models.CharField(max_length=255, verbose_name='title')),
                ('teaser', models.TextField(blank=True, null=True, verbose_name='teaser')),
                ('body', models.TextField(blank=True, null=True, verbose_name='body')),
                ('address', models.CharField(blank=True, max_length=500, null=True, verbose_name='address')),
                ('order', models.IntegerField(default=0, verbose_name='order')),
                ('visible', models.BooleanField(default=True)),
                ('image', models.CharField(blank=True, max_length=30, null=True)),
            ],
            options={
                'ordering': ['order', 'title'],
            },
        ),
        migrations.CreateModel(
            name='PageAddress',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('address', models.TextField(blank=True, max_length=500, null=True, verbose_name='address')),
                ('order', models.IntegerField(default=0, verbose_name='order')),
                ('page', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='pages.Page')),
            ],
            options={
                'ordering': ['order', 'id'],
                'verbose_name': 'Page Link',
                'verbose_name_plural': 'Page Links',
            },
        ),
        migrations.CreateModel(
            name='PageCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('title', models.CharField(max_length=255, verbose_name='title')),
                ('icon', models.CharField(blank=True, max_length=255, null=True, verbose_name='icon')),
                ('show_as_page', models.BooleanField(default=False)),
                ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='child_set', to='pages.PageCategory')),
                ('post_thread', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='microfeed2.PostThread')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PageImage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('order', models.IntegerField(default=0)),
                ('page', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='pages.Page')),
            ],
            options={
                'ordering': ['order', 'id'],
            },
        ),
        migrations.CreateModel(
            name='PageLink',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('title', models.CharField(blank=True, max_length=30, null=True, verbose_name='title')),
                ('url', models.CharField(max_length=500, verbose_name='url')),
                ('order', models.IntegerField(default=0, verbose_name='order')),
                ('page', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='pages.Page')),
            ],
            options={
                'ordering': ['order', 'id'],
                'verbose_name': 'Page Link',
                'verbose_name_plural': 'Page Links',
            },
        ),
        migrations.AddField(
            model_name='page',
            name='category',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='pages.PageCategory'),
        ),
        migrations.AddField(
            model_name='page',
            name='created_by',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='created_page_set', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='page',
            name='language',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='field_trans.Language'),
        ),
        migrations.AddField(
            model_name='page',
            name='last_edited_by',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='last_edited_page_set', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='page',
            name='post_thread',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='microfeed2.PostThread'),
        ),
    ]
