# Generated by Django 2.2.3 on 2019-07-12 19:28

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('project_name', models.CharField(max_length=256)),
                ('summary', tinymce.models.HTMLField(verbose_name='Summary')),
                ('created_on', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'ordering': ['-created_on'],
            },
        ),
        migrations.CreateModel(
            name='Worker',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=100)),
                ('last_name', models.CharField(max_length=100)),
                ('date_of_birth', models.DateField(blank=True, null=True)),
                ('post', models.CharField(max_length=256)),
                ('avatar', models.CharField(blank=True, choices=[('1', 'https://mdbootstrap.com/img/Photos/Avatars/avatar-1.jpg'), ('2', 'https://mdbootstrap.com/img/Photos/Avatars/avatar-2.jpg'), ('3', 'https://mdbootstrap.com/img/Photos/Avatars/avatar-3.jpg')], default='1', max_length=1)),
            ],
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('summary', tinymce.models.HTMLField(verbose_name='Summary')),
                ('priority_of_task', models.CharField(blank=True, choices=[('N', 'Normal'), ('H', 'High'), ('U', 'Urgent')], default='N', max_length=1)),
                ('type_of_task', models.CharField(blank=True, choices=[('B', 'Bug'), ('F', 'Feature')], default='B', max_length=1)),
                ('date_of_start', models.DateField(auto_now_add=True)),
                ('date_of_end', models.DateField(blank=True, null=True)),
                ('estimated_time', models.CharField(max_length=200)),
                ('comments', models.TextField()),
                ('author', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
                ('project', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='Tracker.Project')),
            ],
        ),
        migrations.AddField(
            model_name='project',
            name='workers',
            field=models.ManyToManyField(help_text='Select a worker for this project', to='Tracker.Worker'),
        ),
    ]
