# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-11-10 23:12
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion
import django_powerbank.db.models.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='OptOut',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('email', models.EmailField(max_length=254, verbose_name='email')),
                ('ts', models.DateTimeField(auto_now=True, verbose_name='update timestamp')),
                ('confirmed', models.DateTimeField(blank=True, null=True, verbose_name='confirmation timestamp')),
                ('data', django_powerbank.db.models.fields.JSONField(blank=True, default='{}', null=True, verbose_name='extra data')),
                ('comment', models.TextField(blank=True, null=True, verbose_name='comment')),
                ('secret', django_powerbank.db.models.fields.SecretField(max_length=200)),
                ('ssl', models.NullBooleanField()),
                ('host', models.CharField(blank=True, max_length=200, null=True)),
                ('ip', models.GenericIPAddressField(blank=True, null=True)),
                ('ua', models.CharField(blank=True, max_length=200, null=True)),
                ('cookies', models.TextField(blank=True, null=True)),
            ],
            options={
                'verbose_name': 'opt out',
                'default_related_name': 'out_outs',
                'verbose_name_plural': 'oup outs',
            },
        ),
        migrations.CreateModel(
            name='OptOutFeedback',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.CharField(max_length=250, verbose_name='text')),
                ('slug', django_powerbank.db.models.fields.AutoSlugField(max_length=30, unique=True)),
                ('default', models.BooleanField(default=False, verbose_name='checked by default')),
                ('ordinal', models.PositiveIntegerField(default=0, verbose_name='ordinal')),
            ],
            options={
                'verbose_name': 'feedback option',
                'default_related_name': 'feedback',
                'verbose_name_plural': 'feedback options',
            },
        ),
        migrations.CreateModel(
            name='OptOutFeedbackTranslation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('language', models.CharField(choices=[('af', 'Afrikaans'), ('ar', 'Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmål'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')], max_length=5)),
                ('text', models.CharField(max_length=250, verbose_name='question')),
                ('feedback', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='django_opt_out.OptOutFeedback')),
            ],
            options={
                'verbose_name': 'feedback option translation',
                'default_related_name': 'translations',
                'verbose_name_plural': 'feedback options translations',
            },
        ),
        migrations.CreateModel(
            name='OptOutTag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, verbose_name='tag name')),
                ('description', models.CharField(default='', max_length=250, verbose_name='description')),
            ],
            options={
                'verbose_name': 'tag',
                'default_related_name': 'tag_names',
                'verbose_name_plural': 'tags',
            },
        ),
        migrations.CreateModel(
            name='OptOutTagValue',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('value', models.CharField(blank=True, db_index=True, max_length=80, null=True, verbose_name='tag value')),
                ('opt_out', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tags', to='django_opt_out.OptOut')),
                ('tag', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='tags', to='django_opt_out.OptOutTag')),
            ],
            options={
                'verbose_name': 'tag',
                'default_related_name': 'tags',
                'verbose_name_plural': 'tags',
            },
        ),
        migrations.AddField(
            model_name='optoutfeedback',
            name='tags',
            field=models.ManyToManyField(blank=True, related_name='feedback', to='django_opt_out.OptOutTag', verbose_name='tags'),
        ),
        migrations.AddField(
            model_name='optout',
            name='feedback',
            field=models.ManyToManyField(related_name='out_outs', to='django_opt_out.OptOutFeedback', verbose_name='feedback'),
        ),
        migrations.AlterUniqueTogether(
            name='optoutfeedbacktranslation',
            unique_together=set([('feedback', 'language'), ('feedback', 'text')]),
        ),
    ]
