# -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-03-27 14:05
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('domain', '0030_permissions'),
        ('tasks', '0008_remove_time_period'),
    ]

    operations = [
        migrations.CreateModel(
            name='TimeFrame',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('days_before', models.IntegerField(blank=True, help_text='.', null=True, verbose_name='Days before start date.')),
                ('days_after', models.IntegerField(blank=True, help_text='Days after end date.', null=True, verbose_name='Attribute')),
                ('end_attribute', models.ForeignKey(blank=True, help_text='The Attribute that is setting the end date for this task (optional).', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='domain.Attribute', verbose_name='End date attribute')),
                ('start_attribute', models.ForeignKey(blank=True, help_text='The Attribute that is setting the start date for this task.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='domain.Attribute', verbose_name='Start date attribute')),
                ('task', models.OneToOneField(help_text='The task this time frame belongs to.', on_delete=django.db.models.deletion.CASCADE, to='tasks.Task', verbose_name='Task')),
            ],
            options={
                'ordering': ('task',),
                'verbose_name': 'Time frame',
                'verbose_name_plural': 'Time frames',
                'permissions': (('view_timeframe', 'Can view Time frame'),),
            },
        ),
    ]
