# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations
import mtp.apps.common.utils
import django.core.validators
import django.utils.timezone
import django.contrib.auth.models
import django_extensions.db.fields


class Migration(migrations.Migration):

    dependencies = [
        ('sync', '__first__'),
        ('auth', '0006_require_contenttypes_0002'),
    ]

    operations = [
        migrations.CreateModel(
            name='MTPUser',
            fields=[
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(null=True, blank=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status', default=False)),
                ('username', models.CharField(max_length=30, unique=True, verbose_name='username', validators=[django.core.validators.RegexValidator('^[\\w.@+-]+$', 'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.', 'invalid')], error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.')),
                ('first_name', models.CharField(max_length=30, blank=True, verbose_name='first name')),
                ('last_name', models.CharField(max_length=30, blank=True, verbose_name='last name')),
                ('email', models.EmailField(max_length=254, blank=True, verbose_name='email address')),
                ('is_staff', models.BooleanField(help_text='Designates whether the user can log into this admin site.', verbose_name='staff status', default=False)),
                ('is_active', models.BooleanField(help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active', default=True)),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('id', django_extensions.db.fields.UUIDField(serialize=False, primary_key=True, blank=True, editable=False)),
                ('natural_language', models.CharField(max_length=10, default='fr', 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'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian 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'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('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 Bokmal'), ('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-cn', 'Simplified Chinese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese'), ('zh-tw', 'Traditional Chinese')])),
                ('business', models.CharField(max_length=255, blank=True)),
                ('dr', models.CharField(max_length=255, blank=True)),
                ('first_update', models.ForeignKey(related_name='mtpuser_by_first', to='sync.Update', blank=True, null=True)),
            ],
            options={
                'abstract': False,
                'verbose_name_plural': 'users',
                'verbose_name': 'user',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Avatar',
            fields=[
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('id', django_extensions.db.fields.UUIDField(serialize=False, primary_key=True, blank=True, editable=False)),
                ('img', models.ImageField(upload_to=mtp.apps.common.utils.upload_to_generator, verbose_name='Photo')),
                ('hash', models.CharField(max_length=36, blank=True)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('first_update', models.ForeignKey(related_name='avatar_by_first', to='sync.Update', blank=True, null=True)),
                ('last_update', models.ForeignKey(related_name='avatar_by_last', to='sync.Update', blank=True, null=True)),
            ],
            options={
                'ordering': ('date',),
            },
        ),
        migrations.CreateModel(
            name='Group',
            fields=[
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('id', django_extensions.db.fields.UUIDField(serialize=False, primary_key=True, blank=True, editable=False)),
                ('name', models.CharField(max_length=100, unique=True, verbose_name='name')),
                ('color', models.CharField(max_length=30, blank=True)),
                ('first_update', models.ForeignKey(related_name='group_by_first', to='sync.Update', blank=True, null=True)),
                ('last_update', models.ForeignKey(related_name='group_by_last', to='sync.Update', blank=True, null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='GroupSet',
            fields=[
                ('is_deleted', models.BooleanField(default=False)),
                ('update_locally', models.BooleanField(default=False)),
                ('id', django_extensions.db.fields.UUIDField(serialize=False, primary_key=True, blank=True, editable=False)),
                ('name', models.CharField(max_length=200)),
                ('first_update', models.ForeignKey(related_name='groupset_by_first', to='sync.Update', blank=True, null=True)),
                ('last_update', models.ForeignKey(related_name='groupset_by_last', to='sync.Update', blank=True, null=True)),
                ('mgroups', models.ManyToManyField(to='accounts.Group')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='mtpuser',
            name='groups',
            field=models.ManyToManyField(related_name='user_set', related_query_name='user', verbose_name='groups', to='auth.Group', blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.'),
        ),
        migrations.AddField(
            model_name='mtpuser',
            name='last_update',
            field=models.ForeignKey(related_name='mtpuser_by_last', to='sync.Update', blank=True, null=True),
        ),
        migrations.AddField(
            model_name='mtpuser',
            name='mgroups',
            field=models.ManyToManyField(to='accounts.Group', blank=True, verbose_name='MTP Groups'),
        ),
        migrations.AddField(
            model_name='mtpuser',
            name='photo',
            field=models.ForeignKey(related_name='profile_by_photo', to='accounts.Avatar', blank=True, null=True),
        ),
        migrations.AddField(
            model_name='mtpuser',
            name='photos',
            field=models.ManyToManyField(related_name='profile_by_photos', to='accounts.Avatar', blank=True),
        ),
        migrations.AddField(
            model_name='mtpuser',
            name='user_permissions',
            field=models.ManyToManyField(related_name='user_set', related_query_name='user', verbose_name='user permissions', to='auth.Permission', blank=True, help_text='Specific permissions for this user.'),
        ),
    ]
