# Generated by Django 2.0.3 on 2018-06-04 17:18

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Document',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                ('code', models.CharField(help_text="A short code, like 'tos' or 'privacy', used to identify the various types of documents.", max_length=16)),
                ('name', models.CharField(help_text='Name of this document.', max_length=255)),
                ('details', models.TextField(help_text='A description of this document, about one paragraph in length. Explain what the document is, and why the user should review it.')),
                ('text', models.TextField(help_text='The text of this document, HTML is OK.')),
                ('required_by', models.DateTimeField(help_text="The time that this document must be signed by. After this date, the document will be considered 'required' by the django-consent middleware, and logged-in users will need to sign it before being able to browse your site.")),
                ('order', models.IntegerField(default=1000, help_text='An integer used to sort the list of Documents')),
                ('prev_version', models.OneToOneField(blank=True, help_text='The previous revision of this document. Only the most recent revision of each document code will be active at any given time.', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='next_version', to='signoff.Document')),
            ],
            options={
                'ordering': ['order'],
            },
        ),
        migrations.CreateModel(
            name='DocumentConsent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                ('ip', models.GenericIPAddressField(help_text='The IP address from which the document was signed.')),
                ('xff_header', models.CharField(blank=True, help_text='The X-Forwarded-For header sent when the document was signed.', max_length=255, null=True)),
                ('document', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='consents', to='signoff.Document')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
