# Generated by Django 3.2 on 2021-04-10 18:58

import aleksis.core.models
import django.contrib.sites.managers
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    dependencies = [
        ('sites', '0002_alter_domain_unique'),
        ('core', '0012_valid_from_announcement'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='globalpermissions',
            options={'default_permissions': (), 'managed': False, 'permissions': (
            ('view_system_status', 'Can view system status'), ('link_persons_accounts', 'Can link persons to accounts'),
            ('manage_data', 'Can manage data'), ('impersonate', 'Can impersonate'), ('search', 'Can use search'),
            ('change_site_preferences', 'Can change site preferences'),
            ('change_person_preferences', 'Can change person preferences'),
            ('change_group_preferences', 'Can change group preferences'), ('test_pdf', 'Can test PDF generation'))},
        ),
        migrations.CreateModel(
            name='PDFFile',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('extended_data', models.JSONField(default=dict, editable=False)),
                ('expires_at', models.DateTimeField(default=aleksis.core.models.PDFFile._get_default_expiration, verbose_name='File expires at')),
                ('html', models.TextField(verbose_name='Rendered HTML')),
                ('file', models.FileField(blank=True, null=True, upload_to='pdfs/', verbose_name='Generated PDF file')),
                ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pdf_files', to='core.person', verbose_name='Owner')),
                ('site', models.ForeignKey(default=1, editable=False, on_delete=django.db.models.deletion.CASCADE, to='sites.site')),
            ],
            options={
                'verbose_name': 'PDF file',
                'verbose_name_plural': 'PDF files',
            },
            managers=[
                ('objects', django.contrib.sites.managers.CurrentSiteManager()),
            ],
        ),
    ]
