# Generated by Django 3.2.16 on 2023-01-18 11:57

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

import pretix.base.models.base


class Migration(migrations.Migration):

    dependencies = [
        ('pretixbase', '0227_item_personalized'),
    ]

    operations = [
        migrations.CreateModel(
            name='ScheduledOrganizerExport',
            fields=[
                ('id', models.BigAutoField(primary_key=True, serialize=False)),
                ('export_identifier', models.CharField(max_length=190)),
                ('export_form_data', models.JSONField(default=dict)),
                ('locale', models.CharField(max_length=250)),
                ('mail_additional_recipients', models.TextField()),
                ('mail_additional_recipients_cc', models.TextField()),
                ('mail_additional_recipients_bcc', models.TextField()),
                ('mail_subject', models.CharField(max_length=250)),
                ('mail_template', models.TextField()),
                ('schedule_rrule', models.TextField(null=True)),
                ('schedule_rrule_time', models.TimeField()),
                ('schedule_next_run', models.DateTimeField(blank=True, null=True)),
                ('error_counter', models.IntegerField(default=0)),
                ('error_last_message', models.TextField(null=True)),
                ('timezone', models.CharField(default='UTC', max_length=100)),
                ('organizer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='scheduled_exports', to='pretixbase.organizer')),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
            bases=(models.Model, pretix.base.models.base.LoggingMixin),
        ),
        migrations.CreateModel(
            name='ScheduledEventExport',
            fields=[
                ('id', models.BigAutoField(primary_key=True, serialize=False)),
                ('export_identifier', models.CharField(max_length=190)),
                ('export_form_data', models.JSONField(default=dict)),
                ('locale', models.CharField(max_length=250)),
                ('mail_additional_recipients', models.TextField()),
                ('mail_additional_recipients_cc', models.TextField()),
                ('mail_additional_recipients_bcc', models.TextField()),
                ('mail_subject', models.CharField(max_length=250)),
                ('mail_template', models.TextField()),
                ('schedule_rrule', models.TextField(null=True)),
                ('schedule_rrule_time', models.TimeField()),
                ('schedule_next_run', models.DateTimeField(blank=True, null=True)),
                ('error_counter', models.IntegerField(default=0)),
                ('error_last_message', models.TextField(null=True)),
                ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='scheduled_exports', to='pretixbase.event')),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
            bases=(models.Model, pretix.base.models.base.LoggingMixin),
        ),
    ]
