# Generated by Django 6.0.2 on 2026-03-06 19:29

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


class Migration(migrations.Migration):

    dependencies = [
        ('documentos', '0001_initial'),
        ('temporadas', '0002_temporada_miembros'),
    ]

    operations = [
        migrations.CreateModel(
            name='Factura',
            fields=[
                ('documento_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='documentos.documento')),
                ('empresa', models.CharField(max_length=100, verbose_name='Nombre de la empresa')),
                ('importe', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='Importe (€)')),
            ],
            options={
                'verbose_name': 'Factura',
                'verbose_name_plural': 'Facturas',
            },
            bases=('documentos.documento',),
        ),
        migrations.AlterModelOptions(
            name='documento',
            options={'ordering': ['-fecha_subida'], 'verbose_name': 'Documento', 'verbose_name_plural': 'Documentos'},
        ),
        migrations.RemoveField(
            model_name='documento',
            name='titulo',
        ),
        migrations.AddField(
            model_name='documento',
            name='nombre',
            field=models.CharField(default='Documento antiguo', max_length=100, verbose_name='Nombre del documento'),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name='documento',
            name='categoria',
            field=models.CharField(choices=[('aerodinamica', 'Aerodinámica'), ('chasis', 'Chasis'), ('business', 'Business & Operations'), ('e_powertrain', 'E-Powertrain'), ('electronica', 'Electrónica'), ('sdf', 'SDF'), ('motor_transmision', 'Motor & Transmisión'), ('software', 'Software'), ('normativa', 'General / Normativa')], max_length=20),
        ),
        migrations.AlterField(
            model_name='documento',
            name='descripcion',
            field=models.TextField(blank=True, null=True, verbose_name='Descripción del documento'),
        ),
        migrations.RemoveField(
            model_name='documento',
            name='temporada',
        ),
        migrations.AlterField(
            model_name='documento',
            name='tipo',
            field=models.CharField(choices=[('fabricacion', 'Fabricación'), ('diseno', 'Diseño / CAD'), ('concepto', 'Concepto'), ('simulacion', 'Simulación'), ('dossier_patrocinado', 'Dossier Patrocinio'), ('informe', 'Informe'), ('tutorial', 'Tutorial'), ('otro', 'Otro')], default='informe', max_length=20),
        ),
        migrations.AddField(
            model_name='documento',
            name='temporada',
            field=models.ManyToManyField(related_name='documentos_asociados', to='temporadas.temporada'),
        ),
    ]
