# Generated by Django 4.2.10 on 2024-03-03 15:01 import api.users.validators import django.core.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Friendship', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('addedAt', models.DateTimeField(auto_now_add=True)), ], ), migrations.CreateModel( name='Profile', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('login', models.CharField(max_length=30, validators=[django.core.validators.RegexValidator('^[a-zA-Z0-9-]+$')])), ('email', models.EmailField(max_length=50)), ('password', models.CharField(max_length=100, validators=[django.core.validators.RegexValidator('^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9]).{6,100}$')])), ('countryCode', models.CharField(max_length=2, validators=[django.core.validators.RegexValidator('[a-zA-Z]{2}'), api.users.validators.CountryCodeValidator()])), ('isPublic', models.BooleanField()), ('phone', models.CharField(max_length=20, null=True, validators=[django.core.validators.MaxLengthValidator(20), django.core.validators.RegexValidator('\\+[\\d]+')])), ('image', models.URLField(null=True)), ('friends', models.ManyToManyField(blank=True, through='users.Friendship', to='users.profile')), ], ), migrations.AddField( model_name='friendship', name='from_profile', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='friendship_from', to='users.profile'), ), migrations.AddField( model_name='friendship', name='to_profile', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='friendship_to', to='users.profile'), ), ]