# Generated by Django 5.2.11 on 2026-05-05 16:13

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


class Migration(migrations.Migration):

    dependencies = [
        ('affiliates_app', '0003_alter_affiliateprofile_profile_photo'),
    ]

    operations = [
        migrations.CreateModel(
            name='AffiliateBusinessCard',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('referral_link', models.URLField(help_text='Full referral URL (including ?ref=CODE)', max_length=500)),
                ('qr_code_image', models.ImageField(blank=True, help_text='Generated QR code image for this referral link', null=True, upload_to='business_cards/qrcodes/')),
                ('business_card_image', models.ImageField(blank=True, help_text='Final composite business card image (with QR code, name, details)', null=True, upload_to='business_cards/composites/')),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('design_version', models.CharField(blank=True, default='default', max_length=50)),
                ('is_active', models.BooleanField(default=True)),
                ('affiliate_profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='business_cards', to='affiliates_app.affiliateprofile')),
            ],
            options={
                'verbose_name': 'Affiliate Business Card',
                'verbose_name_plural': 'Affiliate Business Cards',
                'ordering': ['-created_at'],
            },
        ),
    ]
