# Generated by Django 2.2.9 on 2020-11-06 10:49

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('etikihead', '0002_contact_sent_to_etiki'),
    ]

    operations = [
        migrations.CreateModel(
            name='RelatedTodo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('active', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='ToDo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('description', models.TextField(max_length=1000)),
                ('active', models.BooleanField(default=True)),
                ('comment', models.CharField(blank=True, max_length=500, null=True)),
                ('related_todo', models.ManyToManyField(blank=True, related_name='to_master_todo', through='etikihead.RelatedTodo', to='etikihead.ToDo')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='relatedtodo',
            name='from_todos',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='from_todos', to='etikihead.ToDo', verbose_name='master_todo'),
        ),
        migrations.AddField(
            model_name='relatedtodo',
            name='to_todos',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='to_todos', to='etikihead.ToDo', verbose_name='related_todo'),
        ),
    ]
