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

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('Project', '0001_initial'),
        ('Organizations', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Files',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file_url', models.FileField(blank=True, null=True, upload_to=Tasks.models.get_file_filename, verbose_name='Task File')),
            ],
            options={
                'verbose_name_plural': 'Files',
                'verbose_name': 'File',
            },
        ),
        migrations.CreateModel(
            name='Images',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image_url', models.ImageField(blank=True, height_field='height_field', null=True, upload_to=Tasks.models.get_image_filename, verbose_name='Task Image', width_field='width_field')),
                ('width_field', models.IntegerField(default=0)),
                ('height_field', models.IntegerField(default=0)),
            ],
            options={
                'verbose_name_plural': 'Image',
                'verbose_name': 'Image',
            },
        ),
        migrations.CreateModel(
            name='Tasks',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('completed', models.BooleanField(default=False)),
                ('completed_on', models.DateTimeField(blank=True, null=True)),
                ('title', models.CharField(default=None, max_length=150, verbose_name='Task Title')),
                ('due_date', models.DateField(blank=True, null=True, verbose_name='Due Date')),
                ('notes', models.TextField(blank=True, null=True, verbose_name='Task Notes')),
                ('group', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='Organizations.Groups')),
                ('organization', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Organizations.Organizations')),
                ('project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='projecttasks', to='Project.Projects')),
                ('sub_project', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='subprojecttasks', to='Project.SubProject')),
                ('users', models.ManyToManyField(blank=True, default=None, to='Organizations.Users')),
            ],
            options={
                'verbose_name_plural': 'Tasks',
                'verbose_name': 'Task',
            },
        ),
        migrations.AddField(
            model_name='images',
            name='task',
            field=models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='taskimages', to='Tasks.Tasks'),
        ),
        migrations.AddField(
            model_name='files',
            name='task',
            field=models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='taskfiles', to='Tasks.Tasks'),
        ),
    ]
