# Generated by Django 5.0.3 on 2026-04-06 01:50

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


class Migration(migrations.Migration):

    dependencies = [
        ('bengkel', '0007_open_reg_link'),
    ]

    operations = [
        migrations.CreateModel(
            name='BengkelContribution',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('comment', models.TextField(blank=True)),
                ('submitted_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('bengkel', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='contributions', to='bengkel.bengkel')),
                ('jemputan', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='contribution', to='bengkel.jemputan')),
            ],
            options={
                'verbose_name': 'Sumbangan Peserta',
                'verbose_name_plural': 'Sumbangan Peserta',
                'ordering': ['submitted_at'],
            },
        ),
        migrations.CreateModel(
            name='BengkelLaporan',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tajuk', models.CharField(max_length=300)),
                ('pdf_file', models.FileField(blank=True, upload_to='laporan/%Y/%m/')),
                ('status', models.CharField(choices=[('pending', 'Menunggu'), ('processing', 'Sedang Diproses'), ('done', 'Selesai'), ('failed', 'Gagal')], default='pending', max_length=20)),
                ('ralat', models.TextField(blank=True)),
                ('generated_at', models.DateTimeField(auto_now_add=True)),
                ('bengkel', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='laporan', to='bengkel.bengkel')),
            ],
            options={
                'verbose_name': 'Laporan Bengkel',
                'verbose_name_plural': 'Laporan Bengkel',
                'ordering': ['generated_at'],
            },
        ),
        migrations.CreateModel(
            name='ContributionFile',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(upload_to='contributions/%Y/%m/')),
                ('original_name', models.CharField(max_length=255)),
                ('uploaded_at', models.DateTimeField(auto_now_add=True)),
                ('contribution', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='files', to='bengkel.bengkelcontribution')),
            ],
            options={
                'ordering': ['uploaded_at'],
            },
        ),
    ]
