# Generated by Django 3.0.5 on 2020-12-09 06:39

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('CompanyUser', '0003_auto_20201209_0639'),
        ('DMS', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Group',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('selected_user_list', models.CharField(max_length=100, verbose_name='Selected User List')),
                ('total_user', models.CharField(max_length=100, verbose_name='Total User')),
                ('group_name', models.CharField(max_length=100, verbose_name='Group Name')),
                ('group_desc', models.CharField(max_length=300, verbose_name='Group Description')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now_add=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='CompanyUser.CompanyUser')),
            ],
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('task_title', models.CharField(max_length=200, verbose_name='Task Title')),
                ('task_description', models.CharField(max_length=1000, verbose_name='Task Description')),
                ('assigned_type', models.CharField(choices=[('1', 'User'), ('2', 'Group'), ('3', 'department')], max_length=10)),
                ('start_date', models.DateTimeField()),
                ('due_date', models.DateTimeField()),
                ('priority', models.CharField(default='Normal', max_length=10)),
                ('status', models.CharField(choices=[('Open', 'Open'), ('In Progress', 'In Progress'), ('Done', 'Done')], default='Open', max_length=20)),
                ('task_type', models.CharField(choices=[('1', 'General'), ('2', 'Document Task')], default='1', max_length=2)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now_add=True)),
                ('assigned_to_group', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='assigned_to_group', to='TMS.Group')),
                ('assigned_to_user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='assigned_to_user', to='CompanyUser.CompanyUser')),
                ('document_file', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='document_file', to='DMS.ScanFile')),
                ('user', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, related_name='created_task_by', to='CompanyUser.CompanyUser')),
                ('user_department', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='user_department', to='CompanyUser.UserDepartment')),
            ],
        ),
        migrations.CreateModel(
            name='TaskFileManagement',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file_name', models.CharField(blank=True, max_length=250, null=True)),
                ('file_size', models.CharField(blank=True, max_length=250, null=True)),
                ('file_version', models.IntegerField(default=1)),
                ('attached_resources', models.FileField(default='', upload_to=TMS.models.TaskFileManagement.folder_path)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now_add=True)),
                ('is_same_file', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='TMS.TaskFileManagement')),
                ('task', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='TMS.Task')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='CompanyUser.CompanyUser')),
            ],
        ),
        migrations.CreateModel(
            name='TaskComment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('comment', models.CharField(max_length=500, verbose_name='Comment')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now_add=True)),
                ('task', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='TMS.Task', verbose_name='Task Primary Comment Id')),
                ('user', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='CompanyUser.CompanyUser')),
            ],
        ),
        migrations.CreateModel(
            name='TaskActivityLogs',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('log_type', models.CharField(max_length=250)),
                ('log_description', models.TextField(max_length=65500)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now_add=True)),
                ('user', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='CompanyUser.CompanyUser')),
            ],
        ),
    ]
