# -*- coding: utf-8 -*-
# Generated by Django 1.11.11 on 2018-03-22 18:37
from __future__ import unicode_literals

import cms.models.fields
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import image_cropping.fields
import parler.models
import project.utils


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='DownloadFile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ordering', models.IntegerField(default=50, verbose_name='Sortierung')),
                ('groups', models.ManyToManyField(related_name='files', to='auth.Group', verbose_name='Mitgliedergruppen')),
            ],
            options={
                'verbose_name_plural': 'Download Files',
                'ordering': ['ordering'],
                'verbose_name': 'Download File',
            },
            bases=(parler.models.TranslatableModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='DownloadFileTranslation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')),
                ('name', models.CharField(blank=True, max_length=512, null=True, verbose_name='Name')),
                ('description', models.TextField(blank=True, null=True, verbose_name='Beschreibung')),
                ('file', models.FileField(max_length=512, upload_to='protected_files')),
                ('master', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='portal.DownloadFile')),
            ],
            options={
                'db_tablespace': '',
                'default_permissions': (),
                'db_table': 'portal_downloadfile_translation',
                'managed': True,
                'verbose_name': 'Download File Translation',
            },
        ),
        migrations.CreateModel(
            name='DownloadSection',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ordering', models.IntegerField(default=50, verbose_name='Sortierung')),
            ],
            options={
                'verbose_name_plural': 'Download Sections',
                'ordering': ['ordering'],
                'verbose_name': 'Download Section',
            },
            bases=(parler.models.TranslatableModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='DownloadSectionTranslation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')),
                ('title', models.CharField(max_length=100, verbose_name='Title')),
                ('master', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='portal.DownloadSection')),
            ],
            options={
                'db_tablespace': '',
                'default_permissions': (),
                'db_table': 'portal_downloadsection_translation',
                'managed': True,
                'verbose_name': 'Download Section Translation',
            },
        ),
        migrations.CreateModel(
            name='DownloadTag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
            options={
                'verbose_name_plural': 'Download Tags',
                'verbose_name': 'Download Tag',
            },
            bases=(parler.models.TranslatableModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='DownloadTagTranslation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')),
                ('name', models.CharField(max_length=100, verbose_name='Name')),
                ('master', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='portal.DownloadTag')),
            ],
            options={
                'db_tablespace': '',
                'default_permissions': (),
                'db_table': 'portal_downloadtag_translation',
                'managed': True,
                'verbose_name': 'Download Tag Translation',
            },
        ),
        migrations.CreateModel(
            name='Information',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cropping', image_cropping.fields.ImageRatioField('image', '1200x800', adapt_rotation=False, allow_fullsize=False, free_crop=True, help_text=None, hide_image_field=False, size_warning=False, verbose_name='cropping')),
                ('published', models.BooleanField(default=False, verbose_name='Veröffentlicht')),
                ('updated', models.DateTimeField(auto_now=True, verbose_name='Aktualisiert')),
                ('groups', models.ManyToManyField(related_name='tasks', to='auth.Group', verbose_name='Mitglieder Gruppe')),
                ('image', project.utils.CroppableFilerImageField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.FILER_IMAGE_MODEL, verbose_name='Bild')),
                ('informed_users', models.ManyToManyField(blank=True, null=True, to=settings.AUTH_USER_MODEL, verbose_name='Als gelesen markiert von:')),
                ('placeholder', cms.models.fields.PlaceholderField(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, slotname='content', to='cms.Placeholder')),
            ],
            options={
                'verbose_name_plural': 'Informationen',
                'ordering': ['-updated'],
                'verbose_name': 'Information',
            },
            bases=(parler.models.TranslatableModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='InformationTranslation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')),
                ('title', models.CharField(max_length=100, verbose_name='Title')),
                ('master', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='portal.Information')),
            ],
            options={
                'db_tablespace': '',
                'default_permissions': (),
                'db_table': 'portal_information_translation',
                'managed': True,
                'verbose_name': 'Information Translation',
            },
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=255, verbose_name='Vorname')),
                ('last_name', models.CharField(max_length=255, verbose_name='Nachname')),
                ('street', models.CharField(blank=True, max_length=255, null=True, verbose_name='Strasse')),
                ('zip', models.IntegerField(blank=True, null=True, verbose_name='PLZ')),
                ('place', models.CharField(blank=True, max_length=255, null=True, verbose_name='Ort')),
                ('email', models.EmailField(blank=True, max_length=254, null=True, verbose_name='E-Mail')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='profile', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'User Profile',
                'verbose_name': 'User Profil',
            },
        ),
        migrations.AddField(
            model_name='downloadfile',
            name='section',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='files', to='portal.DownloadSection', verbose_name='Download Section'),
        ),
        migrations.AddField(
            model_name='downloadfile',
            name='tags',
            field=models.ManyToManyField(blank=True, null=True, related_name='files', to='portal.DownloadTag', verbose_name='Suchbegriffe'),
        ),
        migrations.AlterUniqueTogether(
            name='informationtranslation',
            unique_together=set([('language_code', 'master')]),
        ),
        migrations.AlterUniqueTogether(
            name='downloadtagtranslation',
            unique_together=set([('language_code', 'master')]),
        ),
        migrations.AlterUniqueTogether(
            name='downloadsectiontranslation',
            unique_together=set([('language_code', 'master')]),
        ),
        migrations.AlterUniqueTogether(
            name='downloadfiletranslation',
            unique_together=set([('language_code', 'master')]),
        ),
    ]
