# -*- coding: utf-8 -*-
# Generated by Django 1.11.12 on 2018-04-30 16:22
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion
import everyvoter_common.utils.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Domain',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('modified_at', models.DateTimeField(auto_now=True)),
                ('hostname', models.CharField(max_length=100, unique=True, verbose_name=b'Hostname')),
            ],
            options={
                'verbose_name': 'Domain',
                'verbose_name_plural': 'Domains',
            },
            bases=(everyvoter_common.utils.models.CacheMixinModel, models.Model),
        ),
        migrations.CreateModel(
            name='Organization',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('modified_at', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=50, verbose_name=b'Name')),
                ('homepage', models.URLField(verbose_name=b'Homepage')),
                ('platform_name', models.CharField(max_length=50, verbose_name=b'Platform Name')),
                ('privacy_url', models.URLField(verbose_name=b'Privacy Policy URL', blank=True)),
                ('terms_url', models.URLField(verbose_name=b'Terms of Service URL', blank=True)),
                ('online_vr', models.BooleanField(default=False, help_text=b'If offered use the Online Voter Registration deadline as the registration deadline', verbose_name=b'Online Voter Registion')),
                ('primary_domain', models.ForeignKey(default=None, help_text=b'Domain to attach all links to', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='primary_domain', to='branding.Domain', verbose_name=b'Primary Domain')),
            ],
            options={
                'verbose_name': 'Organization',
                'verbose_name_plural': 'Organizations',
            },
            bases=(everyvoter_common.utils.models.CacheMixinModel, models.Model),
        ),
        migrations.CreateModel(
            name='Theme',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('organization', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='branding.Organization')),
            ],
            options={
                'verbose_name': 'Theme',
                'verbose_name_plural': 'Themes',
            },
        ),
        migrations.AddField(
            model_name='domain',
            name='organization',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='branding.Organization'),
        ),
    ]
