# Generated by Django 5.1.4 on 2025-01-09 16:20

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


class Migration(migrations.Migration):

    dependencies = [
        ('flex_report', '0018_alter_tablebutton_title'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='TemplateSavedFilter',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('slug', models.SlugField(max_length=100, verbose_name='Slug')),
                ('title', models.CharField(max_length=100, verbose_name='Title')),
                ('filters', models.JSONField(default=dict, verbose_name='Filters')),
                ('creator', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='saved_filters', to=settings.AUTH_USER_MODEL)),
                ('template', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='saved_filters', to='flex_report.template')),
            ],
            options={
                'verbose_name': 'Template Saved Filter',
                'verbose_name_plural': 'Template Saved Filters',
                'unique_together': {('slug', 'template'), ('title', 'template')},
            },
        ),
    ]
