# Generated by Django 2.2.9 on 2020-01-28 14:35

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('reportforms', '0004_auto_20191214_1447'),
    ]

    operations = [
        migrations.CreateModel(
            name='FormInstanceRequest',
            fields=[
                ('id', models.CharField(default=base.fields.generate_id, editable=False, max_length=22, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('received_at', models.DateTimeField(blank=True, null=True)),
                ('state', models.CharField(choices=[('new_form_sending', 'New Form Sending'), ('new_form_rejected', 'New Form Rejected'), ('new_form_accepted', 'New Form Accepted'), ('new_form_received', 'New Form Received')], default='new_form_sending', max_length=200)),
                ('comment', models.TextField(blank=True, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('new_instance', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='reportforms.ReportFormInstance')),
                ('old_instance', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='form_requests', to='reportforms.ReportFormInstance')),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
    ]
