change register apis and save user phone in redis

This commit is contained in:
behruz-dev
2025-07-22 15:59:18 +05:00
parent 7102cdbcfd
commit 8f28332b58
11 changed files with 124 additions and 117 deletions

View File

@@ -1,4 +1,4 @@
# Generated by Django 5.2 on 2025-07-14 15:16
# Generated by Django 5.2 on 2025-07-22 15:26
import core.apps.accounts.managers.user
import django.core.validators
@@ -16,6 +16,24 @@ class Migration(migrations.Migration):
]
operations = [
migrations.CreateModel(
name='VerificationCode',
fields=[
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('code', models.PositiveIntegerField()),
('phone', models.CharField(max_length=13, validators=[django.core.validators.RegexValidator(message="Telefon raqam formatda bo'lishi kerak: +998XXXXXXXXX", regex='^\\+998\\d{9}$')])),
('is_expired', models.BooleanField(default=False)),
('is_verify', models.BooleanField(default=False)),
('expiration_time', models.TimeField(blank=True, null=True)),
],
options={
'verbose_name': 'Verification Code',
'verbose_name_plural': 'Verification Codes',
'db_table': 'verification_codes',
},
),
migrations.CreateModel(
name='User',
fields=[