0001_initial.py 3.17 KB
# Generated by Django 4.1.9 on 2023-07-03 22:26

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('organismo', '0002_organismo_es_publico'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Precio',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('precio', models.FloatField(max_length=50)),
                ('vigencia_desde', models.DateTimeField()),
                ('vigencia_hasta', models.DateTimeField()),
                ('moneda', models.CharField(max_length=50)),
                ('precio_ejemplar', models.FloatField(max_length=50)),
                ('usuario', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Administrador',
                'verbose_name_plural': 'Administradores',
            },
        ),
        migrations.CreateModel(
            name='Edicto',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cuerpo_edicto', models.TextField()),
                ('archivo', models.FileField(upload_to='uploads/%Y/%m/%d/', validators=[edicto.utils.valid_extension])),
                ('dias_plubicar', models.FloatField(default=0.0)),
                ('cantidad_sellos', models.FloatField(default=0.0)),
                ('estado', models.CharField(choices=[('iniciado', 'iniciado'), ('pendiente_de_pago', 'pendiente_de_pago'), ('publicado', 'publicado'), ('rechazado', 'rechazado')], default='inciado', max_length=150)),
                ('cantidad_palabras', models.IntegerField()),
                ('cantidad_copias', models.IntegerField()),
                ('fecha_publicacion', models.DateTimeField()),
                ('organismo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organismo.organismo', verbose_name='Organismo')),
                ('usuario', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Usuario')),
            ],
            options={
                'verbose_name': 'Edicto',
                'verbose_name_plural': 'Edictos',
            },
        ),
        migrations.CreateModel(
            name='ComprobantePago',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('resultado', models.FloatField()),
                ('numero_comprobante', models.CharField(max_length=300)),
                ('fecha_pago', models.DateTimeField()),
                ('edicto', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='edicto.edicto')),
            ],
            options={
                'verbose_name': 'ComprobantePago',
                'verbose_name_plural': 'ComprobantesPagos',
            },
        ),
    ]