# Generated by Django 3.0.10 on 2021-05-24 01:34

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('customers', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='CustomPhase',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('selected', models.BooleanField(default=True)),
                ('phase_name', models.CharField(max_length=300, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='CustomTask',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('selected', models.BooleanField(default=True)),
                ('task_name', models.CharField(max_length=300, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Phase',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('name', models.CharField(max_length=300)),
                ('description', models.TextField(blank=True, null=True)),
                ('start_date', models.DateTimeField(default=django.utils.timezone.now)),
                ('due_date', models.DateTimeField(default=django.utils.timezone.now)),
                ('phase_status', models.CharField(choices=[('Not Started', 'Not Started'), ('In Progress', 'In Progress'), ('Completed', 'Completed'), ('Overdue', 'Overdue'), ('Complete Overdue', 'Complete Overdue')], default='In Progress', max_length=25)),
                ('phase_finished', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('name', models.CharField(max_length=300)),
                ('description', models.TextField(blank=True, null=True)),
                ('start_date_upload', models.DateTimeField(default=django.utils.timezone.now)),
                ('due_date_upload', models.DateTimeField(default=django.utils.timezone.now)),
                ('start_date_approve', models.DateTimeField(default=django.utils.timezone.now)),
                ('due_date_approve', models.DateTimeField(default=django.utils.timezone.now)),
                ('task_status', models.CharField(choices=[('Not Started', 'Not Started'), ('In Progress', 'In Progress'), ('Completed', 'Completed'), ('Overdue', 'Overdue'), ('Completed Overdue', 'Completed Overdue')], default='In Progress', max_length=25)),
                ('upload_status', models.CharField(choices=[('Not Started', 'Not Started'), ('In Progress', 'In Progress'), ('Completed', 'Completed'), ('Overdue', 'Overdue'), ('Completed Overdue', 'Completed Overdue')], default='In Progress', max_length=25)),
                ('approve_status', models.CharField(choices=[('Not Started', 'Not Started'), ('In Progress', 'In Progress'), ('Completed', 'Completed'), ('Overdue', 'Overdue'), ('Completed Overdue', 'Completed Overdue')], default='In Progress', max_length=25)),
                ('task_finished', models.BooleanField(default=False)),
                ('date_finished', models.DateTimeField(null=True)),
                ('phase', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='projects.Phase')),
                ('user_approve', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='user_approve', to=settings.AUTH_USER_MODEL)),
                ('user_upload', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='user_upload', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='TaskFiles',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_uploaded', models.DateTimeField(auto_now_add=True)),
                ('name', models.CharField(blank=True, max_length=300, null=True)),
                ('url', models.CharField(blank=True, max_length=300, null=True)),
                ('attachment', models.FileField(blank=True, null=True, upload_to='')),
                ('file_approved', models.BooleanField(default=False)),
                ('file_rejected', models.BooleanField(default=False)),
                ('note', models.CharField(blank=True, max_length=300, null=True)),
                ('date_approved', models.DateTimeField(blank=True, null=True)),
                ('task', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='projects.Task')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=300, unique=True)),
                ('description', models.TextField(blank=True, null=True)),
                ('status', models.CharField(choices=[('Not Started', 'Not Started'), ('In Progress', 'In Progress'), ('QA Review', 'QA Review'), ('Incomplete', 'Incomplete'), ('Client Review', 'Client Review'), ('Approved/Paid', 'Approved/Paid'), ('Finished', 'Finished'), ('On Hold', 'On Hold'), ('Repossessed', 'Repossessed')], default='In Progress', help_text='default status: In Progress', max_length=25)),
                ('priority', models.CharField(choices=[('Low', 'Low'), ('Medium', 'Medium'), ('High', 'High'), ('Urgent', 'Urgent')], default='Medium', help_text='default priority: Medium', max_length=10)),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('start_date', models.DateTimeField(default=django.utils.timezone.now)),
                ('due_date', models.DateTimeField(null=True)),
                ('progress', models.IntegerField(default=0)),
                ('phase_order', models.BooleanField(default=True)),
                ('date_finished', models.DateTimeField(blank=True, null=True)),
                ('customer', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='customers.Customer')),
                ('project_manager', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='phase',
            name='project',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='projects.Project'),
        ),
    ]
