# Generated by Django 3.1 on 2020-08-22 20:43

from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Statistic',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_point', models.DateField(default=django.utils.timezone.now)),
                ('task_in_point', models.IntegerField(default=0)),
                ('task_complited', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='Template',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('active_intervals', models.CharField(db_index=True, default='', max_length=32)),
                ('exclude_selected', models.BooleanField(default=False)),
                ('template_counter', models.IntegerField(default=0)),
                ('template_statistic', models.IntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('descriprion', models.CharField(db_index=True, max_length=128)),
                ('priority', models.CharField(choices=[('L', 'Low'), ('M', 'Medium'), ('H', 'High')], default='M', max_length=1)),
                ('task_type', models.CharField(choices=[('S', 'Simple'), ('T', 'Template'), ('D', 'Decomposite')], default='S', max_length=1)),
                ('traking_type', models.CharField(choices=[('U', 'Untracked'), ('F', 'Fixed'), ('P', 'Period')], default='U', max_length=1)),
                ('task_begin', models.DateTimeField(default=django.utils.timezone.now)),
                ('task_end', models.DateTimeField(default=django.utils.timezone.now)),
                ('lost_time', models.IntegerField(default=0)),
                ('timer_state', models.CharField(choices=[('I', 'Idle'), ('A', 'Active'), ('P', 'Paused')], default='I', max_length=1)),
                ('period', models.CharField(choices=[('D', 'Day'), ('W', 'Week'), ('M', 'Month'), ('Y', 'Year'), ('C', 'Decade'), ('G', 'Global'), ('F', 'Free')], default='F', max_length=1)),
                ('task_state', models.CharField(choices=[('I', 'Idle'), ('A', 'Active'), ('P', 'Paused')], default='I', max_length=1)),
                ('decomposite_task', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='subtasks', to='tasktracker.task')),
                ('template', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='template_tasks', to='tasktracker.template')),
                ('template_of', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='templ_of', to='tasktracker.task')),
            ],
        ),
    ]
