# Generated by Django 3.2.18 on 2023-05-04 08:34

import agir.lib.validators
from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import dynamic_filenames
import stdimage.models


class Migration(migrations.Migration):
    dependencies = [
        migrations.swappable_dependency(settings.NUNTIUS_SEGMENT_MODEL),
        ("activity", "0031_auto_20230427_1736"),
    ]

    operations = [
        migrations.AddField(
            model_name="pushannouncement",
            name="test_segment",
            field=models.ForeignKey(
                blank=True,
                help_text="Segment des personnes auxquelles envoyer des notifications de test",
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="+",
                related_query_name="+",
                to=settings.NUNTIUS_SEGMENT_MODEL,
                verbose_name="Segment",
            ),
        ),
        migrations.AlterField(
            model_name="pushannouncement",
            name="image",
            field=stdimage.models.StdImageField(
                blank=True,
                force_min_size=False,
                help_text="Utiliser une image au format JPEG avec un ratio de 2:1 et de maximum 5 MB.",
                null=True,
                upload_to=dynamic_filenames.FilePattern(
                    filename_pattern="activity/pushannouncements/image/{uuid:.2base32}/{uuid:s}{ext}"
                ),
                validators=[
                    agir.lib.validators.FileSizeValidator(5242880),
                    django.core.validators.FileExtensionValidator(["jpg", "jpeg"]),
                ],
                variations={},
                verbose_name="Image",
            ),
        ),
    ]
