# Generated by Django 3.2.13 on 2022-05-20 11:45

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


class Migration(migrations.Migration):
    dependencies = [
        ("gestion", "0030_auto_20220509_1614"),
    ]

    operations = [
        migrations.AddField(
            model_name="reglement",
            name="code_insee",
            field=models.CharField(
                blank=True,
                max_length=5,
                validators=[django.core.validators.RegexValidator(regex="^\\d{5}$")],
                verbose_name="Code INSEE du lieu de dépense",
            ),
        ),
        migrations.AddField(
            model_name="reglement",
            name="numero_compte",
            field=models.CharField(
                blank=True,
                max_length=5,
                validators=[django.core.validators.RegexValidator(regex="^\\d{5}$")],
                verbose_name="Compte affecté",
            ),
        ),
        migrations.AlterField(
            model_name="document",
            name="numero_piece",
            field=models.CharField(
                blank=True,
                default=None,
                help_text="Le numéro de pièce justificative à utiliser pour l'export vers FinPol.",
                max_length=12,
                null=True,
                unique=True,
                validators=[
                    django.core.validators.RegexValidator(
                        regex=re.compile(
                            "^(?P<compte>\\d{5})(?P<departement>\\d\\d[\\dAB])(?P<ordre>\\d{4})$"
                        )
                    )
                ],
                verbose_name="Numéro de pièce justificative",
            ),
        ),
    ]
