# Generated by Django 3.1.7 on 2021-03-19 18:23

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='TodoList',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='Todo list name')),
            ],
            options={
                'verbose_name': 'Todo list',
                'verbose_name_plural': 'Todo lists',
            },
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=256, verbose_name='Task name')),
                ('is_completed', models.BooleanField(default=False, verbose_name='Completed')),
                ('due_on', models.DateTimeField(blank=True, null=True, verbose_name='Due on')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created')),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tasks', to=settings.AUTH_USER_MODEL, verbose_name='Owner')),
                ('todo_list', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tasks', to='main.todolist', verbose_name='Todo list')),
            ],
            options={
                'verbose_name': 'Task',
                'verbose_name_plural': 'Tasks',
                'ordering': ['due_on'],
            },
        ),
    ]
