# Generated by Django 4.1.3 on 2024-01-23 10:30

import apps.profiles.models
from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import django_countries.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('accounts', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('street_address', models.CharField(blank=True, max_length=255, null=True)),
                ('city', models.CharField(blank=True, max_length=255, null=True)),
                ('state', models.CharField(blank=True, max_length=255, null=True)),
                ('region', models.CharField(blank=True, max_length=255, null=True)),
                ('zip_code', models.CharField(blank=True, max_length=10, null=True)),
                ('country', django_countries.fields.CountryField(max_length=2)),
                ('address_type', models.CharField(choices=[('home', 'Home'), ('work', 'Work'), ('billing', 'Billing'), ('primary', 'Primary'), ('other', 'Other')], max_length=9)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
                ('avatar', models.ImageField(default='profile_avatar/default.png', upload_to=apps.profiles.models.avatar_filename, verbose_name='Profile Picture')),
                ('occupation', models.CharField(blank=True, max_length=255, null=True)),
                ('phone', models.CharField(blank=True, max_length=17, null=True, validators=[django.core.validators.RegexValidator(message="Phone number must be entered in the format: '+999999999'. Up to 15 digits allowed.", regex='^\\d{10,15}$')])),
                ('phone_verified', models.BooleanField(default=False, verbose_name='Is Phone Verified')),
                ('channel_url', models.URLField(blank=True, null=True)),
                ('country', django_countries.fields.CountryField(max_length=2)),
                ('language', models.CharField(blank=True, max_length=255, null=True)),
                ('time_zone', models.CharField(blank=True, max_length=255, null=True)),
                ('communication_phone', models.BooleanField(default=False, verbose_name='Communication With Phone')),
                ('communication_email', models.BooleanField(default=False, verbose_name='Communication With Email')),
                ('allow_changes', models.BooleanField(default=False, verbose_name='Allow Changes')),
                ('address', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='profiles.address')),
            ],
        ),
    ]
