# Generated by Django 4.2.16 on 2025-08-23 07:12

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('B_main', '0015_accesslog'),
    ]

    operations = [
        migrations.CreateModel(
            name='WithdrawalRequest',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(choices=[('PENDING', '승인 대기'), ('APPROVED', '승인 완료'), ('REJECTED', '승인 거부')], default='PENDING', max_length=10, verbose_name='승인 상태')),
                ('reason', models.TextField(blank=True, null=True, verbose_name='탈퇴 사유')),
                ('request_date', models.DateTimeField(auto_now_add=True, verbose_name='요청 일시')),
                ('approved_date', models.DateTimeField(blank=True, null=True, verbose_name='승인 일시')),
                ('admin_notes', models.TextField(blank=True, null=True, verbose_name='관리자 메모')),
                ('backup_data', models.JSONField(default=dict, verbose_name='탈퇴 전 정보 백업')),
                ('approved_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='approved_withdrawals', to=settings.AUTH_USER_MODEL, verbose_name='승인자')),
                ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='B_main.person', verbose_name='Person 정보')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='탈퇴 요청자')),
            ],
            options={
                'verbose_name': '회원탈퇴 요청',
                'verbose_name_plural': '회원탈퇴 요청들',
                'ordering': ['-request_date'],
                'indexes': [models.Index(fields=['status', '-request_date'], name='B_main_with_status_4e8c92_idx'), models.Index(fields=['user', '-request_date'], name='B_main_with_user_id_596df2_idx')],
            },
        ),
    ]
