from django.contrib import admin
from .models import KYCRequest, KYCRequestRussia

@admin.register(KYCRequest)
class KYCRequestAdmin(admin.ModelAdmin):
    list_display = ('uuid', 'user_id', 'country_code', 'status', 'contact_person', 'created_at')
    list_filter = ('status', 'country_code', 'created_at')
    search_fields = ('uuid', 'user_id', 'team_uuid', 'contact_email', 'contact_person')
    readonly_fields = ('uuid', 'created_at', 'updated_at')
    ordering = ('-created_at',)

@admin.register(KYCRequestRussia)
class KYCRequestRussiaAdmin(admin.ModelAdmin):
    list_display = ('uuid', 'company_name', 'contact_person', 'status', 'created_at')
    list_filter = ('status', 'created_at')
    search_fields = ('uuid', 'company_name', 'inn', 'contact_email', 'user_id', 'team_uuid')
    readonly_fields = ('uuid', 'created_at', 'updated_at')
    ordering = ('-created_at',)
    
    fieldsets = (
        ('Основная информация', {
            'fields': ('uuid', 'user_id', 'team_uuid', 'status')
        }),
        ('Компания', {
            'fields': ('company_name', 'company_full_name', 'inn', 'kpp', 'ogrn', 'address')
        }),
        ('Банковские реквизиты', {
            'fields': ('bank_name', 'bik', 'correspondent_account')
        }),
        ('Контактная информация', {
            'fields': ('contact_person', 'contact_email', 'contact_phone')
        }),
        ('Статус', {
            'fields': ('score', 'approved_by', 'approved_at', 'created_at', 'updated_at')
        }),
    )