# Generated by Django 2.2.6 on 2019-10-30 01:44

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Comentario',
            fields=[
                ('idComentario', models.AutoField(primary_key=True, serialize=False)),
                ('contenidoComentario', models.TextField()),
                ('fechaComentario', models.DateField(auto_now_add=True, verbose_name='Date')),
                ('fechaModiComentario', models.DateField(default=None, editable=False, null=True)),
                ('fechaBajaComentario', models.DateField(default=None, editable=False, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Publicacion',
            fields=[
                ('idPublicacion', models.AutoField(primary_key=True, serialize=False)),
                ('tituloPublicacion', models.CharField(max_length=50)),
                ('tipoPublicacion', models.CharField(blank=True, choices=[('Electronica', 'Electronica'), ('Equipamiento', 'Equipamiento'), ('Maquinarias', 'Maquinarias'), ('Telefonia', 'Telefonia'), ('Electronica', 'Electronica'), ('Informatica', 'Informatica'), ('AudioVideo', 'Audio y video'), ('Juegos', 'Juegos'), ('Electrodomesticos', 'Electrodomesticos'), ('Amoblamientos', 'Amoblamientos'), ('Herramientas', 'Herramientas'), ('Bazar', 'Bazar')], max_length=50, null=True)),
                ('estadoPublicacion', models.CharField(blank=True, choices=[('Publicado', 'Publicado'), ('Borrador', 'Borrador'), ('Denunciado', 'Denunciado'), ('Eliminado', 'Eliminado')], max_length=50, null=True)),
                ('Contenido', models.TextField()),
                ('precio', models.TextField()),
                ('FechaPublicacion', models.DateField(auto_now=True, verbose_name='Date')),
                ('FechaBajaPublicacion', models.DateField(default=None, editable=False, null=True)),
                ('FechaModificacionPublicacion', models.DateField(default=None, editable=False, null=True)),
                ('imagen', models.ImageField(blank=True, default='#', null=True, upload_to='images/')),
                ('idUsuarioPublicacion', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Respuesta',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('contenidoRespuesta', models.TextField(blank=True, null=True)),
                ('fechaBajaRespuesta', models.DateTimeField(blank=True, default=None, null=True)),
                ('fechaAltaRespuesta', models.DateTimeField(blank=True, default=None, null=True)),
                ('idComentario', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Sitio.Comentario')),
                ('idUsuario', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Puntaje',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('idPublicacion', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Sitio.Publicacion')),
                ('idUsuario', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Denuncia',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fechaAltaDenuncia', models.DateTimeField(default=django.utils.timezone.now, null=True)),
                ('fechaBajaDenuncia', models.DateTimeField(blank=True, null=True)),
                ('motivoBaja', models.CharField(blank=True, max_length=200, null=True)),
                ('idComentario', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='Sitio.Comentario')),
                ('idPublicacion', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='Sitio.Publicacion')),
                ('idUsuario', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='comentario',
            name='idPublicacion',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Sitio.Publicacion'),
        ),
        migrations.AddField(
            model_name='comentario',
            name='idUsuarioComentario',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
