# Generated by Django 3.1.7 on 2021-03-22 14:04

import apps.user_profile.services
from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='ProfileModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20, validators=[django.core.validators.RegexValidator('^[a-zA-ZА-яёЁґҐіІїЇєЄ]{2,20}$', 'Only alpha, min 2 max 20 ch')])),
                ('surname', models.CharField(max_length=20, validators=[django.core.validators.RegexValidator('^[a-zA-ZА-яёЁґҐіІїЇєЄ]{2,20}$', 'Only alpha, min 2 max 20 ch')])),
                ('age', models.IntegerField(validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(150)])),
                ('avatar', models.ImageField(upload_to=apps.user_profile.services.avatar_upload)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='profile', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'profile',
            },
        ),
    ]
