# Generated by Django 3.2.4 on 2021-06-25 00:32

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('titulo', models.CharField(max_length=255)),
                ('descripcion', models.TextField(max_length=255)),
                ('imagen', models.ImageField(blank=True, null=True, upload_to='posts')),
                ('fecha', models.DateTimeField(auto_now_add=True, null=True, verbose_name='date joined')),
                ('raza', models.CharField(max_length=255)),
                ('nombre_mascota', models.CharField(max_length=255)),
                ('edad_number', models.IntegerField(default=0)),
                ('edad_unidad', models.CharField(max_length=255)),
                ('caracteristicas', models.CharField(max_length=255)),
                ('interaccion_mascotas', models.CharField(max_length=255)),
                ('interaccion_personas', models.CharField(max_length=255)),
                ('vacunas', models.CharField(max_length=255)),
                ('view_count', models.IntegerField(default=0)),
                ('esteril', models.BooleanField(default=False)),
                ('salud', models.CharField(max_length=255)),
                ('motivo_de_adopcion', models.BooleanField(default=False)),
                ('motivo_adopcion_text', models.CharField(blank=True, max_length=255, null=True)),
                ('public', models.BooleanField(default=False)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='posts', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='PostCategory',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='', max_length=255)),
                ('created_date', models.DateTimeField(auto_now_add=True, null=True, verbose_name='date created')),
            ],
        ),
        migrations.CreateModel(
            name='PostLocacion',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('titulo', models.CharField(max_length=255)),
                ('lat', models.DecimalField(blank=True, decimal_places=6, max_digits=9, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Tipo',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='PostImage',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(blank=True, null=True, upload_to='posts')),
                ('post', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='petApp.post')),
            ],
        ),
        migrations.AddField(
            model_name='post',
            name='categoria',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='posts', to='petApp.postcategory'),
        ),
        migrations.AddField(
            model_name='post',
            name='likes',
            field=models.ManyToManyField(blank=True, related_name='post_likes', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='post',
            name='locacion',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='posts', to='petApp.postlocacion'),
        ),
        migrations.AddField(
            model_name='post',
            name='tipo',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='posts', to='petApp.tipo'),
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.CharField(max_length=320)),
                ('account', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='comments', to=settings.AUTH_USER_MODEL)),
                ('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='opinions', to='petApp.post')),
            ],
        ),
    ]
