# Generated by Django 3.0.4 on 2020-05-16 22:48

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='Estado',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=45)),
            ],
        ),
        migrations.CreateModel(
            name='Proyecto',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=45)),
                ('descripcion', models.CharField(max_length=45)),
                ('productOwner', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='productOwner', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Tarea',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=200)),
                ('descripcion', models.TextField(null=True)),
                ('tiempoEstimado', models.IntegerField(null=True)),
                ('fechaCreacion', models.DateTimeField(auto_now_add=True)),
                ('developer', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='developer', to=settings.AUTH_USER_MODEL)),
                ('estadoActual', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='estadoActual', to='app.Estado')),
                ('proyecto', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='proyecto', to='app.Proyecto')),
            ],
        ),
        migrations.CreateModel(
            name='Developer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('activo', models.CharField(max_length=1)),
                ('idProyecto', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='idProyecto', to='app.Proyecto')),
                ('idUser', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='idUser', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Avance',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descripcion', models.TextField(null=True)),
                ('tiempoTrabajado', models.IntegerField()),
                ('tiempoRestante', models.IntegerField()),
                ('fecha', models.DateTimeField(auto_now_add=True)),
                ('tarea', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='tarea', to='app.Tarea')),
                ('usuario', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='usuario', to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
