From 03c0812cf238ff5c71df80ff40311bc5a9b96f3f Mon Sep 17 00:00:00 2001 From: Ruslan Bakiev <572431+veikab@users.noreply.github.com> Date: Tue, 3 Feb 2026 12:07:24 +0700 Subject: [PATCH] Add KYCProfile table and rename KYC models --- ...on_kycdetailsrussia_kycprofile_and_more.py | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 kyc_app/migrations/0004_kycapplication_kycdetailsrussia_kycprofile_and_more.py diff --git a/kyc_app/migrations/0004_kycapplication_kycdetailsrussia_kycprofile_and_more.py b/kyc_app/migrations/0004_kycapplication_kycdetailsrussia_kycprofile_and_more.py new file mode 100644 index 0000000..e5a9ba3 --- /dev/null +++ b/kyc_app/migrations/0004_kycapplication_kycdetailsrussia_kycprofile_and_more.py @@ -0,0 +1,61 @@ +# Generated by Django 5.2.8 on 2026-02-03 05:06 + +import django.db.models.deletion +import uuid +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('contenttypes', '0002_remove_content_type_name'), + ('kyc_app', '0003_remove_kycrequest_status_remove_kycrequest_team_uuid_and_more'), + ] + + operations = [ + migrations.RenameModel( + old_name='KYCRequest', + new_name='KYCApplication', + ), + migrations.RenameModel( + old_name='KYCRequestRussia', + new_name='KYCDetailsRussia', + ), + migrations.AlterField( + model_name='kycapplication', + name='content_type', + field=models.ForeignKey( + blank=True, + null=True, + on_delete=django.db.models.deletion.SET_NULL, + related_name='%(class)s_set', + to='contenttypes.contenttype', + ), + ), + migrations.CreateModel( + name='KYCProfile', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uuid', models.CharField(default=uuid.uuid4, max_length=100, unique=True)), + ('user_id', models.CharField(db_index=True, max_length=255)), + ('team_name', models.CharField(blank=True, max_length=200)), + ('country_code', models.CharField(blank=True, max_length=2)), + ('workflow_status', models.CharField(choices=[('pending', 'Ожидает обработки'), ('active', 'Активен'), ('error', 'Ошибка')], default='pending', max_length=20)), + ('score', models.IntegerField(default=0)), + ('contact_person', models.CharField(blank=True, default='', max_length=255)), + ('contact_email', models.EmailField(blank=True, default='', max_length=254)), + ('contact_phone', models.CharField(blank=True, default='', max_length=50)), + ('object_id', models.PositiveIntegerField(blank=True, null=True)), + ('approved_by', models.CharField(blank=True, max_length=255, null=True)), + ('approved_at', models.DateTimeField(blank=True, null=True)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('updated_at', models.DateTimeField(auto_now=True)), + ('content_type', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_set', to='contenttypes.contenttype')), + ], + options={ + 'verbose_name': 'KYC Profile', + 'verbose_name_plural': 'KYC Profiles', + 'db_table': 'kyc_monitoring', + }, + ), + ]