# Generated by Django 5.2.6 on 2025-12-19 18:18

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Producto',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('nombre', models.CharField(max_length=255)),
                ('descripcion', models.TextField(blank=True, null=True)),
                ('valor', models.DecimalField(decimal_places=2, max_digits=12)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'db_table': 'producto',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='OportunidadProducto',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('cantidad', models.IntegerField(default=1)),
                ('precio_unitario', models.DecimalField(decimal_places=2, help_text='Precio al momento de la venta', max_digits=12)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('deleted_at', models.DateTimeField(blank=True, null=True)),
                ('oportunidad', models.ForeignKey(db_column='oportunidad_id', on_delete=django.db.models.deletion.CASCADE, related_name='productos', to='Models.oportunidaddeventa')),
                ('producto', models.ForeignKey(db_column='producto_id', on_delete=django.db.models.deletion.CASCADE, related_name='oportunidades', to='producto.producto')),
            ],
            options={
                'db_table': 'oportunidad_producto',
                'managed': True,
                'indexes': [models.Index(fields=['oportunidad', 'producto'], name='oportunidad_oportun_063822_idx')],
            },
        ),
    ]
