# Generated by Django 2.2 on 2019-05-06 20:16

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django_tasker_account.models
import django_tasker_account.validators


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Geobase',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('latitude', models.FloatField(verbose_name='Latitude')),
                ('longitude', models.FloatField(verbose_name='Longitude')),
            ],
            options={
                'verbose_name': 'Geobase',
                'verbose_name_plural': 'Geobase',
            },
        ),
        migrations.CreateModel(
            name='Profile',
            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'), ('hy', 'Armenian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kab', 'Kabyle'), ('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')], default='en', max_length=5, verbose_name='Language')),
                ('gender', models.SmallIntegerField(blank=True, choices=[(1, 'Male'), (2, 'Female')], null=True, verbose_name='Gender')),
                ('birth_date', models.DateField(blank=True, null=True, verbose_name='Birth date')),
                ('phone', models.BigIntegerField(blank=True, null=True, validators=[django_tasker_account.validators.mobile_number])),
                ('avatar', models.ImageField(blank=True, null=True, upload_to=django_tasker_account.models.Profile.path)),
                ('geobase', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='django_tasker_account.Geobase', verbose_name='Geobase')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='User')),
            ],
        ),
        migrations.CreateModel(
            name='GeobaseTimezone',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Time zone')),
            ],
            options={
                'verbose_name': 'Geobase timezone',
                'verbose_name_plural': 'Geobase timezone',
                'unique_together': {('name',)},
            },
        ),
        migrations.CreateModel(
            name='GeobaseProvince',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ru', models.CharField(db_index=True, max_length=255, verbose_name='Name russian')),
                ('en', models.CharField(db_index=True, max_length=255, verbose_name='Name english')),
            ],
            options={
                'verbose_name': 'Geobase province',
                'verbose_name_plural': 'Geobase province',
                'unique_together': {('ru', 'en')},
            },
        ),
        migrations.CreateModel(
            name='GeobaseLocality',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ru', models.CharField(db_index=True, max_length=255, verbose_name='Name russian')),
                ('en', models.CharField(db_index=True, max_length=255, verbose_name='Name english')),
            ],
            options={
                'verbose_name': 'Geobase locality',
                'verbose_name_plural': 'Geobase locality',
                'unique_together': {('ru', 'en')},
            },
        ),
        migrations.CreateModel(
            name='GeobaseCountry',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ru', models.CharField(db_index=True, max_length=255, verbose_name='Name russian')),
                ('en', models.CharField(db_index=True, max_length=255, verbose_name='Name english')),
            ],
            options={
                'verbose_name': 'Geobase сountry',
                'verbose_name_plural': 'Geobase сountry',
                'unique_together': {('ru', 'en')},
            },
        ),
        migrations.AddField(
            model_name='geobase',
            name='country',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_tasker_account.GeobaseCountry', verbose_name='Country'),
        ),
        migrations.AddField(
            model_name='geobase',
            name='locality',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_tasker_account.GeobaseLocality', verbose_name='Locality'),
        ),
        migrations.AddField(
            model_name='geobase',
            name='province',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='django_tasker_account.GeobaseProvince', verbose_name='Province'),
        ),
        migrations.AddField(
            model_name='geobase',
            name='timezone',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_tasker_account.GeobaseTimezone', verbose_name='Time zone'),
        ),
        migrations.CreateModel(
            name='Oauth',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('oauth_id', models.CharField(max_length=255, verbose_name='Oauth ID')),
                ('provider', models.IntegerField(choices=[(1, 'Google'), (2, 'Yandex'), (3, 'Mail.ru'), (4, 'VK.com'), (5, 'Facebook')], verbose_name='Server')),
                ('access_token', models.CharField(max_length=255, verbose_name='Access token')),
                ('refresh_token', models.CharField(blank=True, max_length=255, null=True, verbose_name='Refresh token')),
                ('expires_in', models.DateTimeField(verbose_name='Expires date')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='User')),
            ],
            options={
                'verbose_name': 'OAuth',
                'verbose_name_plural': 'OAuth',
                'unique_together': {('oauth_id', 'provider')},
            },
        ),
        migrations.AlterUniqueTogether(
            name='geobase',
            unique_together={('country', 'province', 'locality')},
        ),
    ]
