# Generated by Django 3.2.3 on 2021-06-01 08:44

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Hit',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('target_name', models.CharField(max_length=150, verbose_name='Target name')),
                ('description', models.CharField(max_length=250, verbose_name='Description')),
                ('status', models.PositiveSmallIntegerField(choices=[(1, 'Unassigned'), (2, 'Assigned'), (3, 'Failed'), (4, 'Completed')], default=1, verbose_name='Status')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created at')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated at')),
                ('assigned_to', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='hits', to=settings.AUTH_USER_MODEL, verbose_name='Assigned to')),
                ('created_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='Created by')),
            ],
            options={
                'verbose_name': 'hit',
                'verbose_name_plural': 'hits',
            },
        ),
        migrations.AddIndex(
            model_name='hit',
            index=models.Index(fields=['status'], name='hit_hit_status_20e830_idx'),
        ),
        migrations.AddIndex(
            model_name='hit',
            index=models.Index(fields=['created_by'], name='hit_hit_created_209090_idx'),
        ),
        migrations.AddIndex(
            model_name='hit',
            index=models.Index(fields=['assigned_to'], name='hit_hit_assigne_a65921_idx'),
        ),
        migrations.AddIndex(
            model_name='hit',
            index=models.Index(fields=['-created_at'], name='hit_hit_created_bcce15_idx'),
        ),
        migrations.AddIndex(
            model_name='hit',
            index=models.Index(fields=['-updated_at'], name='hit_hit_updated_7a3b95_idx'),
        ),
    ]
