# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-07 23:13
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0008_alter_user_username_max_length'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='SwishComponent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=75)),
                ('component', models.CharField(max_length=75)),
                ('version', models.CharField(blank=True, max_length=11)),
                ('alias', models.CharField(max_length=75)),
                ('description', models.TextField(blank=True)),
                ('path', models.CharField(max_length=255)),
            ],
            options={
                'verbose_name': 'Component',
            },
        ),
        migrations.CreateModel(
            name='SwishComponentActionPermissions',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=75)),
                ('component', models.CharField(max_length=75)),
                ('action', models.CharField(max_length=75)),
                ('attributes', models.CharField(max_length=75)),
                ('profile_type', models.CharField(default='all', max_length=25)),
                ('grant_action_at_activation', models.BooleanField(default=True)),
                ('grant_action_at_registration', models.BooleanField(default=False)),
            ],
            options={
                'verbose_name': 'Component Permissions',
            },
        ),
        migrations.CreateModel(
            name='SwishComponentActions',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=75)),
                ('alias', models.CharField(max_length=75)),
                ('type', models.CharField(default='view', max_length=75)),
                ('description', models.TextField(blank=True)),
                ('path', models.CharField(max_length=255)),
                ('component', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='swish.SwishComponent')),
            ],
            options={
                'verbose_name': 'Component Action',
            },
        ),
        migrations.CreateModel(
            name='SwishElements',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('token', models.UUIDField(default=uuid.uuid4)),
                ('title', models.CharField(max_length=75)),
                ('note', models.CharField(blank=True, max_length=255)),
                ('content', models.TextField(blank=True)),
                ('ordering', models.IntegerField(default=0)),
                ('position', models.CharField(max_length=50)),
                ('is_published', models.BooleanField(default=False)),
                ('showtitle', models.BooleanField(default=False)),
                ('params', models.TextField(blank=True)),
                ('template', models.CharField(blank=True, max_length=255, null=True)),
                ('element_path', models.CharField(blank=True, max_length=255, null=True)),
                ('type', models.CharField(blank=True, max_length=30)),
                ('published', models.DateTimeField()),
                ('updated', models.DateTimeField(auto_now=True)),
                ('created', models.DateTimeField()),
                ('access', models.ManyToManyField(blank=True, to='auth.Group')),
            ],
            options={
                'verbose_name': 'Module',
                'verbose_name_plural': 'Modules',
            },
        ),
        migrations.CreateModel(
            name='SwishMenu',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('token', models.UUIDField(default=uuid.uuid4, editable=False)),
                ('title', models.CharField(max_length=255)),
                ('alias', models.CharField(max_length=400)),
                ('note', models.CharField(blank=True, max_length=255)),
                ('meta_title', models.CharField(blank=True, max_length=155)),
                ('meta_description', models.CharField(blank=True, max_length=155)),
                ('meta_keywords', models.CharField(blank=True, max_length=155)),
                ('link', models.CharField(blank=True, max_length=1024)),
                ('type', models.CharField(choices=[('component', 'Component'), ('url', 'URL'), ('alias', 'Alias'), ('separator', 'Separator')], max_length=25)),
                ('params', models.TextField(blank=True, default='{}')),
                ('home', models.BooleanField(default=False)),
                ('published', models.DateTimeField(auto_now=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('created', models.DateTimeField(auto_now=True)),
                ('access', models.ManyToManyField(blank=True, to='auth.Group')),
                ('action', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='swish.SwishComponentActions')),
                ('component', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='swish.SwishComponent')),
                ('elements', models.ManyToManyField(blank=True, to='swish.SwishElements')),
            ],
            options={
                'verbose_name': 'Menu',
                'verbose_name_plural': 'Menus',
            },
        ),
        migrations.CreateModel(
            name='SwishMenuTypes',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('token', models.UUIDField(default=uuid.uuid4)),
                ('name', models.CharField(max_length=75)),
                ('slug', models.SlugField(max_length=75)),
                ('description', models.TextField(blank=True)),
            ],
            options={
                'verbose_name': 'Menu Type',
                'verbose_name_plural': 'Menu Types',
            },
        ),
        migrations.CreateModel(
            name='SwishPage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('token', models.UUIDField(default=uuid.uuid4, editable=False)),
                ('title', models.CharField(max_length=150)),
                ('slug', models.CharField(max_length=1064)),
                ('path', models.CharField(max_length=1064)),
                ('template', models.CharField(default='content.html', max_length=75)),
                ('meta_title', models.CharField(max_length=255)),
                ('meta_description', models.CharField(blank=True, max_length=255)),
                ('meta_keywords', models.CharField(blank=True, max_length=255)),
                ('content', models.TextField(blank=True)),
                ('content_override_main', models.BooleanField(default=False)),
                ('status', models.IntegerField(choices=[(0, 'Disabled'), (1, 'Enabled'), (2, 'Under Review'), (3, 'Pending'), (4, 'Not Approved')], default=1)),
                ('params', models.TextField(blank=True)),
            ],
        ),
        migrations.CreateModel(
            name='SwishPageAttribute',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('token', models.UUIDField(default=uuid.uuid4, editable=False)),
                ('name', models.CharField(max_length=35)),
                ('value', models.CharField(max_length=255)),
                ('page', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='swish.SwishPage')),
            ],
        ),
        migrations.CreateModel(
            name='SwishSettings',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('token', models.UUIDField(default=uuid.uuid4, editable=False)),
            ],
        ),
        migrations.CreateModel(
            name='SwishTheme',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('token', models.UUIDField(default=uuid.uuid4, editable=False)),
                ('name', models.CharField(max_length=75)),
                ('description', models.TextField(blank=True)),
                ('path', models.CharField(max_length=1064)),
                ('slug', models.SlugField(blank=True, max_length=1064)),
                ('params', models.TextField(blank=True)),
                ('is_premium', models.BooleanField(default=False)),
            ],
            options={
                'verbose_name': 'Themes',
            },
        ),
        migrations.CreateModel(
            name='SwishThemeChildren',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('token', models.UUIDField(default=uuid.uuid4, editable=False)),
                ('name', models.CharField(max_length=75)),
                ('description', models.TextField(blank=True)),
                ('path', models.CharField(max_length=1064)),
                ('slug', models.SlugField(blank=True, max_length=1064)),
                ('params', models.TextField(blank=True)),
                ('is_premium', models.BooleanField(default=False)),
                ('parent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='swish.SwishTheme')),
            ],
            options={
                'verbose_name': 'Theme > Children',
            },
        ),
        migrations.CreateModel(
            name='SwishUserPermissions',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('attribute', models.CharField(max_length=75)),
                ('has_access', models.BooleanField(default=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'User Permissions',
            },
        ),
        migrations.AddField(
            model_name='swishsettings',
            name='theme',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='swish.SwishTheme'),
        ),
        migrations.AddField(
            model_name='swishpage',
            name='attributes',
            field=models.ManyToManyField(blank=True, null=True, to='swish.SwishPageAttribute'),
        ),
        migrations.AddField(
            model_name='swishpage',
            name='elements',
            field=models.ManyToManyField(blank=True, to='swish.SwishElements'),
        ),
        migrations.AddField(
            model_name='swishpage',
            name='theme',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='swish.SwishTheme'),
        ),
        migrations.AddField(
            model_name='swishmenu',
            name='menutype',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='swish.SwishMenuTypes'),
        ),
        migrations.AddField(
            model_name='swishmenu',
            name='theme',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='swish.SwishTheme'),
        ),
    ]
