# Generated by Django 5.0.6 on 2025-08-13 22:18

import uuid
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('stiftung', '0003_land_alter_dokumentlink_kontext_verpachtung'),
    ]

    operations = [
        migrations.CreateModel(
            name='CSVImport',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('import_type', models.CharField(choices=[('personen', 'Personen'), ('laendereien', 'Ländereien'), ('verpachtungen', 'Verpachtungen')], max_length=20, verbose_name='Import-Typ')),
                ('filename', models.CharField(max_length=255, verbose_name='Dateiname')),
                ('file_size', models.IntegerField(verbose_name='Dateigröße (Bytes)')),
                ('status', models.CharField(choices=[('pending', 'Ausstehend'), ('processing', 'Wird verarbeitet'), ('completed', 'Abgeschlossen'), ('failed', 'Fehlgeschlagen'), ('partial', 'Teilweise erfolgreich')], default='pending', max_length=20)),
                ('total_rows', models.IntegerField(default=0, verbose_name='Gesamtzeilen')),
                ('imported_rows', models.IntegerField(default=0, verbose_name='Importierte Zeilen')),
                ('failed_rows', models.IntegerField(default=0, verbose_name='Fehlgeschlagene Zeilen')),
                ('error_log', models.TextField(blank=True, null=True, verbose_name='Fehlerprotokoll')),
                ('created_by', models.CharField(blank=True, max_length=100, null=True, verbose_name='Erstellt von')),
                ('started_at', models.DateTimeField(auto_now_add=True, verbose_name='Gestartet um')),
                ('completed_at', models.DateTimeField(blank=True, null=True, verbose_name='Abgeschlossen um')),
            ],
            options={
                'verbose_name': 'CSV Import',
                'verbose_name_plural': 'CSV Imports',
                'ordering': ['-started_at'],
            },
        ),
    ]
