30 lines
1.3 KiB
Python
30 lines
1.3 KiB
Python
# Generated by Django 4.2.10 on 2024-03-02 09:47
|
|
|
|
import django.core.validators
|
|
from django.db import migrations, models
|
|
import users.validators
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
]
|
|
|
|
operations = [
|
|
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}'), users.validators.CountryCodeValidator()])),
|
|
('isPublic', models.BooleanField()),
|
|
('phone', models.CharField(blank=True, max_length=20, null=True, validators=[django.core.validators.MaxLengthValidator(20), django.core.validators.RegexValidator('\\+[\\d]+')])),
|
|
('image', models.URLField(blank=True, null=True)),
|
|
],
|
|
),
|
|
]
|