# Generated by Django 3.2.4 on 2021-06-15 08:00

# This migration used the now removed tags app
# and has been edited to remove reference to it.

import core.fields
from django.conf import settings
import django.contrib.postgres.fields
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import django_xworkflows.models


class Migration(migrations.Migration):

    dependencies = [
        ("backers", "0014_reupload_medias"),
        ("eligibility", "0004_eligibilitytest_conclusions"),
        ("categories", "0005_alter_theme_short_description"),
        ("dataproviders", "0002_cleanup_choices_translations"),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("geofr", "0034_cleanup_choices_translations"),
        ("programs", "0009_auto_20210506_1832"),
        ("projects", "0005_auto_20210430_1323"),
        ("aids", "0137_cleanup_choices_translations"),
    ]

    operations = [
        migrations.AlterModelOptions(
            name="aid",
            options={"verbose_name": "Aide", "verbose_name_plural": "Aides"},
        ),
        migrations.AlterField(
            model_name="aid",
            name="aid_types",
            field=core.fields.ChoiceArrayField(
                base_field=models.CharField(
                    choices=[
                        ("grant", "Subvention"),
                        ("loan", "Prêt"),
                        ("recoverable_advance", "Avance récupérable"),
                        ("technical", "Aides en ingénierie"),
                        ("financial", "Aides financières"),
                        ("legal", "Ingénierie juridique / administrative"),
                        ("other", "Autre"),
                    ],
                    max_length=32,
                ),
                blank=True,
                help_text="Précisez le ou les types de l'aide.",
                null=True,
                size=None,
                verbose_name="Types d'aide",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="amended_aid",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to="aids.aid",
                verbose_name="Aide amendée",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="amendment_author_email",
            field=models.EmailField(
                blank=True,
                max_length=254,
                null=True,
                verbose_name="E-mail de l'auteur de l'amendement",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="amendment_author_name",
            field=models.CharField(
                blank=True, max_length=256, verbose_name="Auteur de l'amendement"
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="amendment_author_org",
            field=models.CharField(
                blank=True,
                max_length=255,
                verbose_name="Structure de l'auteur de l'amendement",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="amendment_comment",
            field=models.TextField(blank=True, verbose_name="Commentaire"),
        ),
        migrations.AlterField(
            model_name="aid",
            name="application_url",
            field=models.URLField(
                blank=True,
                max_length=500,
                verbose_name="Lien vers une démarche en ligne",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="author",
            field=models.ForeignKey(
                help_text="Qui renseigne cette aide\xa0?",
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                related_name="aids",
                to=settings.AUTH_USER_MODEL,
                verbose_name="Auteur",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="categories",
            field=models.ManyToManyField(
                blank=True,
                related_name="aids",
                to="categories.Category",
                verbose_name="Sous-thématiques",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="contact_detail",
            field=models.CharField(
                blank=True, max_length=256, verbose_name="Contact (détail)"
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="contact_email",
            field=models.EmailField(
                blank=True, max_length=254, verbose_name="Adresse e-mail de contact"
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="contact_phone",
            field=models.CharField(
                blank=True, max_length=35, verbose_name="Numéro de téléphone"
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="date_created",
            field=models.DateTimeField(
                default=django.utils.timezone.now, verbose_name="Date de création"
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="date_published",
            field=models.DateTimeField(
                blank=True, null=True, verbose_name="Première date de publication"
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="date_updated",
            field=models.DateTimeField(
                auto_now=True, verbose_name="Date de mise à jour"
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="description",
            field=models.TextField(
                verbose_name="Description complète de l'aide et de ses objectifs"
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="destinations",
            field=core.fields.ChoiceArrayField(
                base_field=models.CharField(
                    choices=[
                        ("supply", "Dépenses de fonctionnement"),
                        ("investment", "Dépenses d'investissement"),
                    ],
                    max_length=32,
                ),
                blank=True,
                null=True,
                size=None,
                verbose_name="Types de dépenses / actions couvertes",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="eligibility",
            field=models.TextField(blank=True, verbose_name="Éligibilité"),
        ),
        migrations.AlterField(
            model_name="aid",
            name="eligibility_test",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                related_name="aids",
                to="eligibility.eligibilitytest",
                verbose_name="Test d'éligibilité",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="financer_suggestion",
            field=models.CharField(
                blank=True, max_length=256, verbose_name="Porteurs d'aides suggérés"
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="financers",
            field=models.ManyToManyField(
                related_name="financed_aids",
                through="aids.AidFinancer",
                to="backers.Backer",
                verbose_name="Porteurs d'aides",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="generic_aid",
            field=models.ForeignKey(
                blank=True,
                help_text="Aide générique associée à une aide locale.",
                limit_choices_to={"is_generic": True},
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="local_aids",
                to="aids.aid",
                verbose_name="Aide générique",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="import_data_source",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                related_name="aids",
                to="dataproviders.datasource",
                verbose_name="Source de données",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="import_data_url",
            field=models.URLField(
                blank=True,
                null=True,
                verbose_name="URL d'origine de la donnée importée",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="import_last_access",
            field=models.DateField(
                blank=True, null=True, verbose_name="Date du dernier accès"
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="import_raw_object",
            field=models.JSONField(
                editable=False, null=True, verbose_name="Donnée JSON brute"
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="import_share_licence",
            field=models.CharField(
                blank=True,
                choices=[
                    ("unknown", "Inconnu"),
                    ("openlicence20", "Licence ouverte 2.0"),
                ],
                max_length=50,
                verbose_name="Sous quelle licence cette aide a-t-elle été partagée\xa0?",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="import_uniqueid",
            field=models.CharField(
                blank=True,
                max_length=200,
                null=True,
                unique=True,
                verbose_name="Identifiant d'import unique",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="in_france_relance",
            field=models.BooleanField(
                default=False,
                help_text="Cette aide est-elle éligible au programme France Relance\xa0?",
                verbose_name="France Relance ?",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="instructor_suggestion",
            field=models.CharField(
                blank=True, max_length=256, verbose_name="Instructeurs suggérés"
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="instructors",
            field=models.ManyToManyField(
                blank=True,
                related_name="instructed_aids",
                through="aids.AidInstructor",
                to="backers.Backer",
                verbose_name="Instructeurs",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="is_amendment",
            field=models.BooleanField(default=False, verbose_name="Est un amendement"),
        ),
        migrations.AlterField(
            model_name="aid",
            name="is_call_for_project",
            field=models.BooleanField(
                null=True, verbose_name="Appel à projet / Manifestation d'intérêt"
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="is_generic",
            field=models.BooleanField(
                default=False,
                help_text="Cette aide est-elle générique ?",
                verbose_name="Aide générique ?",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="is_imported",
            field=models.BooleanField(default=False, verbose_name="Importé\xa0?"),
        ),
        migrations.AlterField(
            model_name="aid",
            name="local_characteristics",
            field=models.TextField(blank=True, verbose_name="Spécificités locales"),
        ),
        migrations.AlterField(
            model_name="aid",
            name="mobilization_steps",
            field=core.fields.ChoiceArrayField(
                base_field=models.CharField(
                    choices=[
                        ("preop", "Réflexion / conception"),
                        ("op", "Mise en œuvre / réalisation"),
                        ("postop", "Usage / valorisation"),
                    ],
                    default="preop",
                    max_length=32,
                ),
                blank=True,
                null=True,
                size=None,
                verbose_name="État d'avancement du projet pour bénéficier du dispositif",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="name",
            field=models.CharField(
                help_text="Le titre doit commencer par un verbe à l’infinitif pour que l'objectif de l'aide soit explicite vis-à-vis de ses bénéficiaires.",  # noqa
                max_length=180,
                verbose_name="Nom",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="origin_url",
            field=models.URLField(
                blank=True, max_length=500, verbose_name="URL d'origine"
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="perimeter",
            field=models.ForeignKey(
                blank=True,
                help_text="Sur quel périmètre l'aide est-elle diffusée\xa0?",
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to="geofr.perimeter",
                verbose_name="Périmètre",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="perimeter_suggestion",
            field=models.CharField(
                blank=True, max_length=256, null=True, verbose_name="Périmètre suggéré"
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="predeposit_date",
            field=models.DateField(
                blank=True,
                help_text="Quelle est la date de pré-dépôt des dossiers, si applicable\xa0?",
                null=True,
                verbose_name="Date de pré-dépôt",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="programs",
            field=models.ManyToManyField(
                blank=True,
                related_name="aids",
                to="programs.Program",
                verbose_name="Programmes",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="project_examples",
            field=models.TextField(
                blank=True, default="", verbose_name="Exemples de projets réalisables"
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="projects",
            field=models.ManyToManyField(
                blank=True,
                related_name="aids",
                to="projects.Project",
                verbose_name="Projets",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="recurrence",
            field=models.CharField(
                blank=True,
                choices=[
                    ("oneoff", "Ponctuelle"),
                    ("ongoing", "Permanente"),
                    ("recurring", "Récurrente"),
                ],
                help_text="L'aide est-elle ponctuelle, permanente, ou récurrente\xa0?",
                max_length=16,
                verbose_name="Récurrence",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="short_title",
            field=models.CharField(
                blank=True,
                help_text="Un titre plus concis, pour affichage spécifique.",
                max_length=64,
                verbose_name="Titre court",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="slug",
            field=models.SlugField(
                blank=True,
                help_text="Laisser vide pour autoremplir.",
                verbose_name="Fragment d'URL",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="start_date",
            field=models.DateField(
                blank=True,
                help_text="À quelle date l'aide est-elle ouverte aux candidatures\xa0?",
                null=True,
                verbose_name="Date d'ouverture",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="status",
            field=django_xworkflows.models.StateField(
                max_length=16,
                verbose_name="Statut",
                workflow=django_xworkflows.models._SerializedWorkflow(
                    initial_state="draft",
                    name="AidWorkflow",
                    states=["draft", "reviewable", "published", "deleted"],
                ),
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="submission_deadline",
            field=models.DateField(
                blank=True,
                help_text="Quelle est la date de clôture de dépôt des dossiers\xa0?",
                null=True,
                verbose_name="Date de clôture",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="subvention_comment",
            field=models.CharField(
                blank=True,
                max_length=100,
                verbose_name="Taux de subvention (commentaire optionnel)",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="subvention_rate",
            field=core.fields.PercentRangeField(
                blank=True,
                help_text="Si le taux est fixe, remplissez uniquement le taux max.",
                null=True,
                verbose_name="Taux de subvention, min. et max. (en %, nombre entier)",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="tags",
            field=django.contrib.postgres.fields.ArrayField(
                base_field=models.CharField(blank=True, max_length=50),
                blank=True,
                default=list,
                size=30,
                verbose_name="Mots clés",
            ),
        ),
        migrations.AlterField(
            model_name="aid",
            name="targeted_audiences",
            field=core.fields.ChoiceArrayField(
                base_field=models.CharField(
                    choices=[
                        ("commune", "Communes"),
                        ("epci", "EPCI à fiscalité propre"),
                        ("department", "Départements"),
                        ("region", "Régions"),
                        ("special", "Collectivités d'outre-mer à statuts particuliers"),
                        ("association", "Associations"),
                        ("private_sector", "Entreprises privées"),
                        (
                            "public_cies",
                            "Entreprises publiques locales (Sem, Spl, SemOp)",
                        ),
                        ("public_org", "Établissement public"),
                        ("researcher", "Recherche"),
                        ("private_person", "Particuliers"),
                        ("farmer", "Agriculteurs"),
                    ],
                    max_length=32,
                ),
                blank=True,
                null=True,
                size=None,
                verbose_name="Bénéficiaires de l'aide",
            ),
        ),
    ]
