Add KYC monitoring model with shared base
All checks were successful
Build Docker Image / build (push) Successful in 1m37s

This commit is contained in:
Ruslan Bakiev
2026-01-14 21:11:49 +07:00
parent 9ae89b1270
commit ef4b6b6b1b
2 changed files with 66 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
from django.contrib import admin, messages
from .models import KYCRequest, KYCRequestRussia
from .models import KYCRequest, KYCMonitoring, KYCRequestRussia
from .temporal import KycWorkflowClient
@@ -40,6 +40,31 @@ class KYCRequestAdmin(admin.ModelAdmin):
)
@admin.register(KYCMonitoring)
class KYCMonitoringAdmin(admin.ModelAdmin):
list_display = ('uuid', 'user_id', 'team_name', 'country_code', 'workflow_status', 'contact_person', 'created_at')
list_filter = ('workflow_status', 'country_code', 'created_at')
search_fields = ('uuid', 'user_id', 'team_name', 'contact_email', 'contact_person')
readonly_fields = ('uuid', 'created_at', 'updated_at', 'content_type', 'object_id')
ordering = ('-created_at',)
fieldsets = (
('Основная информация', {
'fields': ('uuid', 'user_id', 'team_name', 'country_code', 'workflow_status')
}),
('Контактная информация', {
'fields': ('contact_person', 'contact_email', 'contact_phone')
}),
('Детали страны (GenericFK)', {
'fields': ('content_type', 'object_id'),
'classes': ('collapse',)
}),
('Статус', {
'fields': ('score', 'approved_by', 'approved_at', 'created_at', 'updated_at')
}),
)
@admin.register(KYCRequestRussia)
class KYCRequestRussiaAdmin(admin.ModelAdmin):
list_display = ('id', 'company_name', 'inn', 'ogrn')