# Generated by Django 4.2.16 on 2024-12-30 18:29

import django.core.validators
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("core_main_app", "0010_template_html_rendering"),
    ]

    operations = [
        migrations.CreateModel(
            name="BlobProcessingModule",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        default=None, max_length=256, unique=True
                    ),
                ),
                (
                    "run_strategy",
                    models.CharField(
                        choices=[
                            ("DEMAND", "Run on demand"),
                            ("CREATE", "Run on create"),
                            ("READ", "Run on read"),
                            ("UPDATE", "Run on update"),
                            ("DELETE", "Run on delete"),
                        ],
                        default="DEMAND",
                        max_length=20,
                    ),
                ),
                (
                    "parameters",
                    models.JSONField(blank=True, default=None, null=True),
                ),
                ("processing_class", models.CharField(max_length=256)),
                (
                    "blob_filename_regexp",
                    models.CharField(
                        default=".*",
                        max_length=250,
                        validators=[django.core.validators.RegexValidator],
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        )
    ]
