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

import base.models
from django.db import migrations, models
import django.db.models.deletion
import djangocms_text_ckeditor.fields
import easy_thumbnails.fields
import parler.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('government_structures', '0003_auto_20180312_1009'),
    ]

    operations = [
        migrations.CreateModel(
            name='SocioculturalDepartment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, help_text='creation date')),
                ('updated_at', models.DateTimeField(auto_now=True, help_text='edition date', null=True)),
                ('name', models.CharField(max_length=100, verbose_name='name')),
                ('photo', easy_thumbnails.fields.ThumbnailerImageField(null=True, upload_to=base.models.file_path, verbose_name='photo')),
                ('twitter', models.CharField(max_length=50)),
                ('url', models.URLField(verbose_name='url')),
                ('government_structure', models.OneToOneField(default=base.models.lastest_government_structure, on_delete=django.db.models.deletion.CASCADE, to='government_structures.GovernmentStructure', verbose_name='government structure')),
            ],
            options={
                'verbose_name': 'sociocultural department',
                'verbose_name_plural': 'sociocultural departments',
                'permissions': (('view_socioculturaldepartment', 'Can view sociocultural department'),),
            },
            bases=(parler.models.TranslatableModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='SocioculturalDepartmentTranslation',
            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=50, verbose_name='title')),
                ('description', djangocms_text_ckeditor.fields.HTMLField(verbose_name='description')),
                ('master', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='sociocultural_departments.SocioculturalDepartment')),
            ],
            options={
                'verbose_name': 'sociocultural department Translation',
                'db_table': 'sociocultural_departments_socioculturaldepartment_translation',
                'db_tablespace': '',
                'managed': True,
                'default_permissions': (),
            },
        ),
        migrations.CreateModel(
            name='SocioculturalDepartmentURL',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, help_text='creation date')),
                ('updated_at', models.DateTimeField(auto_now=True, help_text='edition date', null=True)),
                ('url', models.URLField(verbose_name='url')),
                ('order', models.PositiveIntegerField(default=0, verbose_name='order')),
            ],
            options={
                'verbose_name': 'sociocultural department url',
                'verbose_name_plural': 'sociocultural department urls',
                'ordering': ('order',),
                'permissions': (('view_socioculturaldepartment_url', 'Can view sociocultural department url'),),
            },
            bases=(parler.models.TranslatableModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='SocioculturalDepartmentURLTranslation',
            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, null=True, verbose_name='name')),
                ('description', djangocms_text_ckeditor.fields.HTMLField(verbose_name='description')),
                ('master', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='sociocultural_departments.SocioculturalDepartmentURL')),
            ],
            options={
                'verbose_name': 'sociocultural department url Translation',
                'db_table': 'sociocultural_departments_socioculturaldepartmenturl_translation',
                'db_tablespace': '',
                'managed': True,
                'default_permissions': (),
            },
        ),
        migrations.AddField(
            model_name='socioculturaldepartment',
            name='urls',
            field=models.ManyToManyField(to='sociocultural_departments.SocioculturalDepartmentURL', verbose_name='urls'),
        ),
        migrations.AlterUniqueTogether(
            name='socioculturaldepartmenturltranslation',
            unique_together=set([('language_code', 'master')]),
        ),
        migrations.AlterUniqueTogether(
            name='socioculturaldepartmenttranslation',
            unique_together=set([('language_code', 'master')]),
        ),
    ]
