Initial commit from monorepo

This commit is contained in:
Ruslan Bakiev
2026-01-07 09:16:05 +07:00
commit 685fbbe14a
28 changed files with 2291 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
# Generated manually
import uuid
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='KYCRequest',
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(max_length=255)),
('team_uuid', models.CharField(max_length=100)),
('team_name', models.CharField(blank=True, max_length=200)),
('country_code', models.CharField(blank=True, max_length=2)),
('status', models.CharField(choices=[('pending', 'Ожидает проверки'), ('in_review', 'На рассмотрении'), ('approved', 'Одобрено'), ('rejected', 'Отклонено'), ('expired', 'Истекло')], default='pending', max_length=50)),
('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)),
('registration_number', models.CharField(blank=True, max_length=50)),
('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)),
],
options={
'db_table': 'kyc_requests',
},
),
migrations.CreateModel(
name='KYCRequestRussia',
fields=[
('kycrequest_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='kyc_app.kycrequest')),
('company_name', models.CharField(max_length=255)),
('company_full_name', models.TextField()),
('inn', models.CharField(max_length=12)),
('kpp', models.CharField(blank=True, max_length=9)),
('ogrn', models.CharField(blank=True, max_length=15)),
('address', models.TextField()),
('bank_name', models.CharField(max_length=255)),
('bik', models.CharField(max_length=9)),
('correspondent_account', models.CharField(blank=True, max_length=20)),
],
options={
'db_table': 'kyc_requests_russia',
},
bases=('kyc_app.kycrequest',),
),
]

View File

@@ -0,0 +1,65 @@
# Migration: Remove inheritance, add ContentType GenericFK
import uuid
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
('kyc_app', '0001_initial'),
]
operations = [
# 1. Drop the old inherited table
migrations.DeleteModel(
name='KYCRequestRussia',
),
# 2. Remove registration_number from KYCRequest (was for inherited ogrn)
migrations.RemoveField(
model_name='kycrequest',
name='registration_number',
),
# 3. Add ContentType FK to KYCRequest
migrations.AddField(
model_name='kycrequest',
name='content_type',
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name='kyc_requests',
to='contenttypes.contenttype',
),
),
# 4. Add object_id to KYCRequest
migrations.AddField(
model_name='kycrequest',
name='object_id',
field=models.PositiveIntegerField(blank=True, null=True),
),
# 5. Create new KYCRequestRussia (without inheritance)
migrations.CreateModel(
name='KYCRequestRussia',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('company_name', models.CharField(max_length=255)),
('company_full_name', models.TextField()),
('inn', models.CharField(max_length=12)),
('kpp', models.CharField(blank=True, max_length=9)),
('ogrn', models.CharField(blank=True, max_length=15)),
('address', models.TextField()),
('bank_name', models.CharField(max_length=255)),
('bik', models.CharField(max_length=9)),
('correspondent_account', models.CharField(blank=True, max_length=20)),
],
options={
'db_table': 'kyc_details_russia',
},
),
]

View File

@@ -0,0 +1,31 @@
# Generated by Django 5.2.8 on 2025-12-30 02:48
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('kyc_app', '0002_remove_inheritance'),
]
operations = [
migrations.RemoveField(
model_name='kycrequest',
name='status',
),
migrations.RemoveField(
model_name='kycrequest',
name='team_uuid',
),
migrations.AddField(
model_name='kycrequest',
name='workflow_status',
field=models.CharField(choices=[('pending', 'Ожидает обработки'), ('active', 'Активен'), ('error', 'Ошибка')], default='pending', max_length=20),
),
migrations.AlterField(
model_name='kycrequest',
name='user_id',
field=models.CharField(db_index=True, max_length=255),
),
]

View File