# Generated by Django 5.2.16 on 2026-07-31 18:34

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('campus', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Certificate',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True, verbose_name='UUID Único')),
                ('certificate_code', models.CharField(blank=True, max_length=20, unique=True, verbose_name='Código de Diploma (e.g. LJ-2026-A9B3)')),
                ('issued_at', models.DateTimeField(auto_now_add=True, verbose_name='Emitido el')),
                ('qr_code_image', models.ImageField(blank=True, null=True, upload_to='certificates/qrs/', verbose_name='Imagen QR de Verificación')),
                ('enrollment', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='certificate', to='campus.enrollment', verbose_name='Matrícula')),
            ],
            options={
                'verbose_name': 'Diploma / Certificado',
                'verbose_name_plural': 'Diplomas / Certificados',
                'ordering': ['-issued_at'],
            },
        ),
    ]
