# Generated by Django 5.0.6 on 2026-03-15 23:02

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


class Migration(migrations.Migration):

    dependencies = [
        ('stiftung', '0059_nachweis_kategorie_dms_felder'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='OnboardingEinladung',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('token', models.CharField(db_index=True, max_length=128, unique=True, verbose_name='Token')),
                ('email', models.EmailField(max_length=254, verbose_name='E-Mail-Adresse des Eingeladenen')),
                ('vorname', models.CharField(blank=True, max_length=100, verbose_name='Vorname (optional)')),
                ('nachname', models.CharField(blank=True, max_length=100, verbose_name='Nachname (optional)')),
                ('gueltig_bis', models.DateTimeField(verbose_name='Gültig bis')),
                ('erstellt_am', models.DateTimeField(auto_now_add=True, verbose_name='Erstellt am')),
                ('abgeschlossen_am', models.DateTimeField(blank=True, null=True, verbose_name='Abgeschlossen am')),
                ('status', models.CharField(choices=[('offen', 'Offen'), ('abgeschlossen', 'Abgeschlossen'), ('abgelaufen', 'Abgelaufen'), ('widerrufen', 'Widerrufen')], default='offen', max_length=20, verbose_name='Status')),
                ('notizen', models.TextField(blank=True, verbose_name='Interne Notizen')),
                ('destinataer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='onboarding_einladung', to='stiftung.destinataer', verbose_name='Resultierender Destinatär')),
                ('eingeladen_von', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='onboarding_einladungen', to=settings.AUTH_USER_MODEL, verbose_name='Eingeladen von')),
            ],
            options={
                'verbose_name': 'Onboarding-Einladung',
                'verbose_name_plural': 'Onboarding-Einladungen',
                'ordering': ['-erstellt_am'],
            },
        ),
        migrations.CreateModel(
            name='UploadToken',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('token', models.CharField(db_index=True, max_length=128, unique=True, verbose_name='Token')),
                ('gueltig_bis', models.DateTimeField(verbose_name='Gültig bis')),
                ('erstellt_am', models.DateTimeField(auto_now_add=True, verbose_name='Erstellt am')),
                ('eingeloest_am', models.DateTimeField(blank=True, null=True, verbose_name='Eingelöst am')),
                ('ist_aktiv', models.BooleanField(default=True, verbose_name='Aktiv')),
                ('ip_hash', models.CharField(blank=True, max_length=64, null=True, verbose_name='IP-Hash (SHA-256)')),
                ('erinnerung_gesendet', models.BooleanField(default=False, verbose_name='Erinnerung gesendet')),
                ('destinataer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='upload_tokens', to='stiftung.destinataer', verbose_name='Destinatär')),
                ('nachweis', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='upload_tokens', to='stiftung.vierteljahresnachweis', verbose_name='Nachweis')),
            ],
            options={
                'verbose_name': 'Upload-Token',
                'verbose_name_plural': 'Upload-Token',
                'ordering': ['-erstellt_am'],
            },
        ),
    ]
