# Generated by Django 5.2.15 on 2026-07-07 11:04

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


class Migration(migrations.Migration):

    dependencies = [
        ('claims', '0002_evidencefile'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='ClaimDraft',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(choices=[('processing', 'Wird verarbeitet'), ('review', 'Zur Prüfung'), ('published', 'Veröffentlicht'), ('failed', 'Fehlgeschlagen'), ('rejected', 'Abgelehnt')], default='processing', max_length=20, verbose_name='Status')),
                ('article_url', models.URLField(blank=True, max_length=500, verbose_name='Artikel-URL')),
                ('user_notes', models.TextField(blank=True, verbose_name='Eingabe / Beschreibung')),
                ('uploaded_file', models.FileField(blank=True, help_text='Optional: Bild oder PDF als Kontext', upload_to='drafts/uploads/%Y/%m/', validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['jpg', 'jpeg', 'png', 'gif', 'webp', 'pdf'])], verbose_name='Hochgeladene Datei')),
                ('article_text', models.TextField(blank=True, verbose_name='Extrahierter Artikeltext')),
                ('category_slug', models.SlugField(blank=True, help_text='Slug einer vorhandenen Kategorie, falls passend', max_length=220, verbose_name='Bestehende Kategorie (Slug)')),
                ('new_category_name', models.CharField(blank=True, max_length=200, verbose_name='Neue Kategorie')),
                ('new_category_description', models.TextField(blank=True, verbose_name='Beschreibung neue Kategorie')),
                ('new_category_icon', models.CharField(blank=True, help_text='Bootstrap-Icon-Klasse, z. B. bi-thermometer-half', max_length=50, verbose_name='Icon neue Kategorie')),
                ('title', models.CharField(blank=True, max_length=300, verbose_name='Behauptung')),
                ('claim_status', models.CharField(blank=True, choices=[('falsch', 'Falsch'), ('irrefuehrend', 'Irreführend'), ('teilweise_richtig', 'Teilweise richtig'), ('unbelegt', 'Unbelegt'), ('wissenschaftlicher_konsens', 'Wissenschaftlicher Konsens'), ('offene_frage', 'Offene Frage')], max_length=40, verbose_name='Einordnung')),
                ('short_answer', models.TextField(blank=True, verbose_name='Kurzantwort')),
                ('detailed_explanation', models.TextField(blank=True, verbose_name='Ausführliche Erklärung')),
                ('evidence_level', models.CharField(blank=True, choices=[('sehr_stark', 'Sehr stark'), ('stark', 'Stark'), ('mittel', 'Mittel'), ('schwach', 'Schwach')], max_length=20, verbose_name='Evidenzlevel')),
                ('tags', models.JSONField(blank=True, default=list, verbose_name='Schlagwörter')),
                ('sources', models.JSONField(blank=True, default=list, verbose_name='Quellen')),
                ('counter_arguments', models.JSONField(blank=True, default=list, verbose_name='Gegenargumente')),
                ('conversation', models.JSONField(blank=True, default=list, verbose_name='Konversation')),
                ('ai_raw_response', models.JSONField(blank=True, null=True, verbose_name='KI-Rohantwort')),
                ('error_message', models.TextField(blank=True, verbose_name='Fehlermeldung')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Erstellt am')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Aktualisiert am')),
                ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='claim_drafts', to=settings.AUTH_USER_MODEL, verbose_name='Erstellt von')),
                ('published_claim', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='origin_drafts', to='claims.claim', verbose_name='Veröffentlichte Behauptung')),
            ],
            options={
                'verbose_name': 'Fakten-Entwurf',
                'verbose_name_plural': 'Fakten-Entwürfe',
                'ordering': ['-created_at'],
            },
        ),
    ]
