# Generated by Django 3.0.2 on 2020-02-27 08:22

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('gestionComunidades', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Actividad',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('titulo', models.CharField(max_length=50)),
                ('descripcion', models.CharField(max_length=250)),
                ('fecha_inicio', models.DateField()),
                ('fecha_fin', models.DateField()),
                ('direccion', models.CharField(max_length=250)),
                ('referencia', models.CharField(max_length=400)),
                ('imagen_principal', models.CharField(max_length=500)),
                ('imagen_descripcion', models.CharField(max_length=150)),
                ('culminada', models.BooleanField(default=False, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Categoria',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('titulo', models.CharField(max_length=100)),
                ('descripcion', models.CharField(max_length=200)),
                ('imagen', models.CharField(max_length=500)),
            ],
        ),
        migrations.CreateModel(
            name='Departamento',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Valor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('titulo', models.CharField(max_length=50)),
                ('descripcion', models.CharField(max_length=300)),
            ],
        ),
        migrations.CreateModel(
            name='RelacionActividadValor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('id_actividad', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gestionActividades.Actividad')),
                ('id_valor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gestionActividades.Valor')),
            ],
        ),
        migrations.CreateModel(
            name='RelacionActividadUsuario',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('realizado', models.BooleanField(default=False)),
                ('fecha', models.DateField(auto_now_add=True, null=True)),
                ('id_actividad', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gestionActividades.Actividad')),
                ('id_usuario', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Provincia',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=50)),
                ('id_departamento', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gestionActividades.Departamento')),
            ],
        ),
        migrations.CreateModel(
            name='Distrito',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=50)),
                ('id_provincia', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gestionActividades.Provincia')),
            ],
        ),
        migrations.AddField(
            model_name='actividad',
            name='id_categoria',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gestionActividades.Categoria'),
        ),
        migrations.AddField(
            model_name='actividad',
            name='id_comunidad',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='gestionComunidades.Comunidad'),
        ),
        migrations.AddField(
            model_name='actividad',
            name='id_distrito',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gestionActividades.Distrito'),
        ),
        migrations.AddField(
            model_name='actividad',
            name='id_usuario',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
