# Generated by Django 3.2.18 on 2023-04-05 11:59

import agir.lib.model_fields
from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("groups", "0017_supportgroup_certification_date"),
        ("mailing", "0048_segment_excluded_events"),
    ]

    operations = [
        migrations.AlterModelOptions(
            name="segment",
            options={"verbose_name": "Segment", "verbose_name_plural": "Segments"},
        ),
        migrations.AddField(
            model_name="segment",
            name="supportgroup_is_certified",
            field=models.BooleanField(
                default=False, verbose_name="Limiter aux membres de groupes certifiés"
            ),
        ),
        migrations.AddField(
            model_name="segment",
            name="supportgroup_types",
            field=agir.lib.model_fields.ChoiceArrayField(
                base_field=models.CharField(
                    choices=[
                        ("L", "Groupe local"),
                        ("B", "Groupe thématique"),
                        ("F", "Groupe fonctionnel"),
                        ("D", "Boucle départementale"),
                    ],
                    max_length=4,
                ),
                blank=True,
                default=list,
                size=None,
                verbose_name="Limiter aux membres des groupes d'un ces types",
            ),
        ),
        migrations.AlterField(
            model_name="segment",
            name="supportgroup_subtypes",
            field=models.ManyToManyField(
                blank=True,
                help_text="Ce filtre ne sera pas appliqué lorsque le filtre 'Limiter aux membres d'un de ces groupes' est actif",
                to="groups.SupportGroupSubtype",
                verbose_name="Limiter aux membres des groupes d'un de ces sous-types",
            ),
        ),
    ]
