# Generated by Django 5.2.11 on 2026-05-06 16:09

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


class Migration(migrations.Migration):

    dependencies = [
        ('affiliates_app', '0007_affiliatemarketingresource_slide_deck_pdf'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Language',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(choices=[('en', 'English'), ('nl', 'Dutch'), ('zh', 'Chinese'), ('ja', 'Japanese'), ('fr', 'French'), ('es', 'Spanish'), ('it', 'Italian'), ('de', 'German'), ('pt', 'Portuguese'), ('ru', 'Russian'), ('hi', 'Hindi')], max_length=2, unique=True)),
                ('name', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='AffiliateResourceRequest',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('request_date', models.DateTimeField(default=django.utils.timezone.now)),
                ('status', models.CharField(choices=[('pending', 'Pending'), ('in_progress', 'In Progress'), ('completed', 'Completed'), ('rejected', 'Rejected')], default='pending', max_length=20)),
                ('admin_notes', models.TextField(blank=True, help_text='Internal notes for admin response')),
                ('response_message', models.TextField(blank=True, help_text='Message to send to affiliate (e.g., estimated delivery time)')),
                ('responded_at', models.DateTimeField(blank=True, null=True)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('affiliate_profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='resource_requests', to='affiliates_app.affiliateprofile')),
                ('responded_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='handled_resource_requests', to=settings.AUTH_USER_MODEL)),
                ('requested_languages', models.ManyToManyField(help_text='Select one or more languages', to='affiliates_app.language')),
            ],
            options={
                'verbose_name': 'Affiliate Resource Request',
                'verbose_name_plural': 'Affiliate Resource Requests',
                'ordering': ['-request_date'],
            },
        ),
    ]
