# Generated by Django 5.0.3 on 2026-05-05 03:13

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


class Migration(migrations.Migration):

    dependencies = [
        ('bengkel', '0019_themeidea_themevote'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='BlueprintPillar',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('urutan', models.PositiveIntegerField(default=0)),
                ('teras', models.CharField(max_length=300, verbose_name='Nama Teras')),
                ('penerangan', models.TextField()),
                ('tema_dirangkumi', models.TextField(blank=True, help_text='Senarai Tema yang membentuk Teras ini')),
                ('generated_at', models.DateTimeField(auto_now_add=True)),
                ('bengkel', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='blueprint_pillars', to='bengkel.bengkel')),
            ],
            options={
                'verbose_name': 'Blueprint — Teras',
                'verbose_name_plural': 'Blueprint — Teras',
                'ordering': ['urutan', 'id'],
            },
        ),
        migrations.CreateModel(
            name='PillarIdea',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('idea', models.TextField(verbose_name='Cadangan Skop Teras')),
                ('status_ai', models.CharField(default='pending', max_length=20)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('pillar', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ideas', to='bengkel.blueprintpillar')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pillar_ideas', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Blueprint — Skop Teras',
                'verbose_name_plural': 'Blueprint — Skop Teras',
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='PillarVote',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('pillar', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='votes', to='bengkel.blueprintpillar')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pillar_votes', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Blueprint — Sokongan Teras',
                'verbose_name_plural': 'Blueprint — Sokongan Teras',
                'unique_together': {('user', 'pillar')},
            },
        ),
    ]
