<gh_stars>0
# Generated by Django 3.2.5 on 2021-07-23 15:32

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='ReminderType',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', time_stamped_model.models.CreationDateTimeField(auto_now_add=True)),
                ('modified', time_stamped_model.models.ModificationDateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=255)),
            ],
            options={
                'ordering': ('name',),
            },
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', time_stamped_model.models.CreationDateTimeField(auto_now_add=True)),
                ('modified', time_stamped_model.models.ModificationDateTimeField(auto_now=True)),
                ('task_due_date', models.DateField()),
                ('task_due_time', models.TimeField(blank=True, null=True)),
                ('assign_to', models.ManyToManyField(blank=True, related_name='assign_to_by', to=settings.AUTH_USER_MODEL)),
                ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='task_created_by', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ('task_due_date', 'task_due_time'),
            },
        ),
        migrations.CreateModel(
            name='TaskStatus',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', time_stamped_model.models.CreationDateTimeField(auto_now_add=True)),
                ('modified', time_stamped_model.models.ModificationDateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=100)),
                ('type', models.PositiveSmallIntegerField(choices=[(1, 'Active'), (2, 'Paused'), (3, 'Completed')], default=1)),
            ],
            options={
                'ordering': ('name',),
            },
        ),
        migrations.CreateModel(
            name='TaskType',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', time_stamped_model.models.CreationDateTimeField(auto_now_add=True)),
                ('modified', time_stamped_model.models.ModificationDateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=255)),
            ],
            options={
                'ordering': ('name',),
            },
        ),
        migrations.CreateModel(
            name='TimeType',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', time_stamped_model.models.CreationDateTimeField(auto_now_add=True)),
                ('modified', time_stamped_model.models.ModificationDateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=100)),
                ('type', models.PositiveSmallIntegerField(choices=[(0, 'All Day'), (1, 'Custom'), (2, 'Set Time')], default=2)),
                ('time', models.TimeField(blank=True, null=True)),
                ('default', models.BooleanField()),
            ],
            options={
                'ordering': ('name',),
            },
        ),
        migrations.CreateModel(
            name='TaskTypeReminder',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', time_stamped_model.models.CreationDateTimeField(auto_now_add=True)),
                ('modified', time_stamped_model.models.ModificationDateTimeField(auto_now=True)),
                ('minutes_before', models.IntegerField()),
                ('reminder_type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='django_event_tasks.remindertype')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='TaskReminder',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', time_stamped_model.models.CreationDateTimeField(auto_now_add=True)),
                ('modified', time_stamped_model.models.ModificationDateTimeField(auto_now=True)),
                ('reminder_date_time', models.DateTimeField()),
                ('reminder_type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='django_event_tasks.remindertype')),
                ('task', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='django_event_tasks.task')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='task',
            name='task_status',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='django_event_tasks.taskstatus'),
        ),
        migrations.AddField(
            model_name='task',
            name='task_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='django_event_tasks.tasktype'),
        ),
        migrations.AddField(
            model_name='task',
            name='time_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='django_event_tasks.timetype'),
        ),
    ]
